Code:
/ DotNET / DotNET / 8.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
- UserControl.cs
- XmlTypeMapping.cs
- ToolBarOverflowPanel.cs
- XmlSerializerFactory.cs
- ErrorWrapper.cs
- Speller.cs
- CurrentChangingEventArgs.cs
- EdmProviderManifest.cs
- SessionPageStatePersister.cs
- WindowsIdentity.cs
- AuthenticationConfig.cs
- SqlMethods.cs
- CodeDomConfigurationHandler.cs
- BitmapEffectInput.cs
- PageOutputQuality.cs
- WebPartsPersonalization.cs
- InternalsVisibleToAttribute.cs
- DeflateEmulationStream.cs
- ZipPackage.cs
- HttpModuleActionCollection.cs
- TailCallAnalyzer.cs
- DocumentReferenceCollection.cs
- ACL.cs
- AnnotationResourceCollection.cs
- _LazyAsyncResult.cs
- ImageField.cs
- XmlImplementation.cs
- SimpleHandlerBuildProvider.cs
- FloaterParagraph.cs
- ItemMap.cs
- ColumnResult.cs
- ValidationResult.cs
- AffineTransform3D.cs
- SchemaCollectionCompiler.cs
- TextEditorDragDrop.cs
- SemaphoreSecurity.cs
- XappLauncher.cs
- TextProperties.cs
- TimelineClockCollection.cs
- DockingAttribute.cs
- XPathNavigatorReader.cs
- SimpleWebHandlerParser.cs
- TreeIterator.cs
- Pen.cs
- AddingNewEventArgs.cs
- BitmapEffect.cs
- FileSystemEventArgs.cs
- ReflectEventDescriptor.cs
- FrameworkElement.cs
- TagPrefixCollection.cs
- BooleanAnimationBase.cs
- StylusTip.cs
- listviewsubitemcollectioneditor.cs
- BrowserCapabilitiesFactoryBase.cs
- ScrollContentPresenter.cs
- BinaryObjectReader.cs
- ScrollViewerAutomationPeer.cs
- HealthMonitoringSectionHelper.cs
- SimpleTypeResolver.cs
- LineInfo.cs
- TextRangeBase.cs
- FieldDescriptor.cs
- followingsibling.cs
- NamespaceDecl.cs
- SecurityChannel.cs
- XPathSingletonIterator.cs
- ListItemCollection.cs
- ProfileManager.cs
- QilTargetType.cs
- OleDbRowUpdatedEvent.cs
- InvalidAsynchronousStateException.cs
- JsonWriterDelegator.cs
- File.cs
- TimeoutException.cs
- EndSelectCardRequest.cs
- XsltQilFactory.cs
- SmiEventSink.cs
- DesignerTransaction.cs
- QuaternionRotation3D.cs
- SoapExtensionReflector.cs
- TabletDevice.cs
- BitmapEffectrendercontext.cs
- TemplateControlParser.cs
- PlanCompilerUtil.cs
- SessionKeyExpiredException.cs
- FontConverter.cs
- DefaultBindingPropertyAttribute.cs
- BuilderInfo.cs
- DeploymentSectionCache.cs
- SafeRightsManagementEnvironmentHandle.cs
- TypeProvider.cs
- exports.cs
- WorkflowInstanceProxy.cs
- ModelItemDictionary.cs
- ElementNotAvailableException.cs
- LayoutUtils.cs
- ImageIndexEditor.cs
- PropertyChangedEventArgs.cs
- Membership.cs
- LifetimeServices.cs