Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / Range.cs / 1305376 / Range.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; internal struct Range { private int min; private int max; private bool isNotNull; // zero bit pattern represents null public Range(int min, int max) { if (min > max) { throw ExceptionBuilder.RangeArgument(min, max); } this.min = min; this.max = max; isNotNull = true; } public int Count { get { if (IsNull) return 0; return max - min + 1; } } public bool IsNull { get { return !isNotNull; } } public int Max { get { CheckNull(); return max; } } public int Min { get { CheckNull(); return min; } } internal void CheckNull() { if (this.IsNull) { throw ExceptionBuilder.NullRange(); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; internal struct Range { private int min; private int max; private bool isNotNull; // zero bit pattern represents null public Range(int min, int max) { if (min > max) { throw ExceptionBuilder.RangeArgument(min, max); } this.min = min; this.max = max; isNotNull = true; } public int Count { get { if (IsNull) return 0; return max - min + 1; } } public bool IsNull { get { return !isNotNull; } } public int Max { get { CheckNull(); return max; } } public int Min { get { CheckNull(); return min; } } internal void CheckNull() { if (this.IsNull) { throw ExceptionBuilder.NullRange(); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AnnotationResourceCollection.cs
- Visual3D.cs
- DropShadowBitmapEffect.cs
- PerformanceCounterManager.cs
- SystemException.cs
- WebBrowserEvent.cs
- NullEntityWrapper.cs
- TypeToTreeConverter.cs
- SelectorItemAutomationPeer.cs
- IfElseDesigner.xaml.cs
- ConnectionConsumerAttribute.cs
- StrongNameIdentityPermission.cs
- LabelLiteral.cs
- SmiGettersStream.cs
- TextContainerChangeEventArgs.cs
- Trace.cs
- SortableBindingList.cs
- RC2.cs
- OutOfProcStateClientManager.cs
- NullRuntimeConfig.cs
- Line.cs
- WebRequest.cs
- XmlSchemaObjectCollection.cs
- ArithmeticLiteral.cs
- Transform3DGroup.cs
- ScrollBar.cs
- EntityContainerEmitter.cs
- SmtpNetworkElement.cs
- DropTarget.cs
- SQLGuid.cs
- DocumentOrderQuery.cs
- Storyboard.cs
- FormViewInsertedEventArgs.cs
- Selector.cs
- ReceiveSecurityHeaderEntry.cs
- ByteAnimationBase.cs
- PrePostDescendentsWalker.cs
- DataGridViewRowPostPaintEventArgs.cs
- XmlEntityReference.cs
- SqlUserDefinedAggregateAttribute.cs
- CheckBoxStandardAdapter.cs
- Control.cs
- OperatingSystem.cs
- DomainUpDown.cs
- EditorAttribute.cs
- ASCIIEncoding.cs
- AuthenticationModuleElementCollection.cs
- BlockUIContainer.cs
- XamlTypeMapper.cs
- ButtonStandardAdapter.cs
- ObjectQueryProvider.cs
- TableRowGroup.cs
- FixedNode.cs
- RemotingConfigParser.cs
- CqlLexer.cs
- ComponentRenameEvent.cs
- InputScopeNameConverter.cs
- CounterCreationDataCollection.cs
- ConfigurationElement.cs
- SafeEventLogWriteHandle.cs
- DataGridColumn.cs
- PropertyToken.cs
- EntityCommandExecutionException.cs
- ExceptionUtil.cs
- UnorderedHashRepartitionStream.cs
- ClientUtils.cs
- TableAdapterManagerGenerator.cs
- Journal.cs
- SortKey.cs
- VisualBasicSettings.cs
- XamlTemplateSerializer.cs
- MenuItemAutomationPeer.cs
- OdbcDataReader.cs
- LocalizeDesigner.cs
- FrameworkContentElement.cs
- EncoderParameters.cs
- SessionKeyExpiredException.cs
- LogManagementAsyncResult.cs
- EntityType.cs
- DataGridViewImageCell.cs
- CompositeDuplexBindingElementImporter.cs
- _AuthenticationState.cs
- ChannelCacheDefaults.cs
- SettingsBindableAttribute.cs
- Literal.cs
- OLEDB_Util.cs
- ToolboxItemCollection.cs
- InputLangChangeRequestEvent.cs
- AssemblyHash.cs
- Expression.DebuggerProxy.cs
- EnlistmentTraceIdentifier.cs
- File.cs
- ISFTagAndGuidCache.cs
- PaperSource.cs
- regiisutil.cs
- BrushValueSerializer.cs
- Win32.cs
- WorkflowPrinting.cs
- XmlC14NWriter.cs
- BuildProvidersCompiler.cs