Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Data / System / Data / Range.cs / 1 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SmiTypedGetterSetter.cs
- CaretElement.cs
- XmlProcessingInstruction.cs
- Decimal.cs
- XmlSchemaSimpleTypeUnion.cs
- SystemColors.cs
- MetadataConversionError.cs
- ColorIndependentAnimationStorage.cs
- ValidatingPropertiesEventArgs.cs
- OrderPreservingMergeHelper.cs
- RegionIterator.cs
- CompilationUnit.cs
- HtmlUtf8RawTextWriter.cs
- PopOutPanel.cs
- ObservableCollection.cs
- SymbolDocumentGenerator.cs
- SelectionProcessor.cs
- dataSvcMapFileLoader.cs
- EventLogRecord.cs
- Cloud.cs
- DebugHandleTracker.cs
- Utils.cs
- DurationConverter.cs
- XmlLoader.cs
- FolderNameEditor.cs
- ThreadPool.cs
- SamlEvidence.cs
- XmlUtil.cs
- GetKeyedHashRequest.cs
- HandlerBase.cs
- ListenerPerfCounters.cs
- CompilationUnit.cs
- AsyncOperation.cs
- WebSysDescriptionAttribute.cs
- FormViewPageEventArgs.cs
- XmlDeclaration.cs
- TabItemAutomationPeer.cs
- HostExecutionContextManager.cs
- ComponentEditorPage.cs
- ObjectDataSourceDesigner.cs
- SqlDataSourceStatusEventArgs.cs
- codemethodreferenceexpression.cs
- Propagator.JoinPropagator.cs
- XmlElement.cs
- XamlTypeMapper.cs
- ConfigurationProperty.cs
- InputLanguageManager.cs
- _ContextAwareResult.cs
- OdbcException.cs
- WindowsTooltip.cs
- EntityParameter.cs
- MissingManifestResourceException.cs
- PnrpPeerResolver.cs
- SimpleHandlerBuildProvider.cs
- MethodToken.cs
- DataSourceHelper.cs
- GridView.cs
- DoubleLinkListEnumerator.cs
- ScrollEvent.cs
- TypeSystemProvider.cs
- WSSecurityXXX2005.cs
- Compiler.cs
- PhysicalFontFamily.cs
- XmlWriterTraceListener.cs
- XomlCompilerHelpers.cs
- IncrementalReadDecoders.cs
- TcpStreams.cs
- EntityKey.cs
- Matrix3D.cs
- ComponentCommands.cs
- HttpListenerRequest.cs
- EnumValAlphaComparer.cs
- MainMenu.cs
- BitmapCodecInfoInternal.cs
- SafeCryptoHandles.cs
- _LocalDataStore.cs
- AttachInfo.cs
- InvokeMethodDesigner.xaml.cs
- BlurBitmapEffect.cs
- ActivityInfo.cs
- PersistenceMetadataNamespace.cs
- RelationshipEndCollection.cs
- ConfigurationStrings.cs
- InitializationEventAttribute.cs
- NavigateEvent.cs
- NodeLabelEditEvent.cs
- PartialCachingControl.cs
- ConfigurationValidatorAttribute.cs
- AssemblyBuilder.cs
- Assembly.cs
- EncoderParameter.cs
- COM2ComponentEditor.cs
- InternalSafeNativeMethods.cs
- ManagementBaseObject.cs
- DictionaryBase.cs
- EntityType.cs
- BaseContextMenu.cs
- ResourceDictionary.cs
- HandleInitializationContext.cs
- TargetInvocationException.cs