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
- SchemaNames.cs
- DrawToolTipEventArgs.cs
- WorkflowOperationBehavior.cs
- DataExpression.cs
- HostingPreferredMapPath.cs
- SqlLiftWhereClauses.cs
- ComponentChangedEvent.cs
- Converter.cs
- PropertyToken.cs
- ButtonChrome.cs
- VirtualDirectoryMappingCollection.cs
- MessageQueuePermission.cs
- BinaryFormatter.cs
- WinFormsUtils.cs
- Point4D.cs
- Stylesheet.cs
- TabletDeviceInfo.cs
- XmlSchemaGroup.cs
- HttpBrowserCapabilitiesBase.cs
- AttributeCollection.cs
- TrackingMemoryStreamFactory.cs
- IgnoreFileBuildProvider.cs
- WebPartTransformerAttribute.cs
- LinearKeyFrames.cs
- StringConverter.cs
- EntityFunctions.cs
- ContactManager.cs
- BufferedConnection.cs
- Socket.cs
- ScrollViewerAutomationPeer.cs
- CommonDialog.cs
- SchemaMapping.cs
- Visual3D.cs
- BitmapVisualManager.cs
- IOException.cs
- XmlDataSourceView.cs
- ResourcePermissionBase.cs
- Line.cs
- ContentPresenter.cs
- CategoryGridEntry.cs
- BevelBitmapEffect.cs
- CustomTrackingRecord.cs
- RepeaterItemCollection.cs
- ObjectConverter.cs
- EncoderFallback.cs
- MaskInputRejectedEventArgs.cs
- FacetEnabledSchemaElement.cs
- BinaryOperationBinder.cs
- IdentityNotMappedException.cs
- AdornerLayer.cs
- DrawTreeNodeEventArgs.cs
- ColumnMapCopier.cs
- Brush.cs
- PenThreadPool.cs
- EventToken.cs
- ObjectDataSourceSelectingEventArgs.cs
- EmptyElement.cs
- SafeNativeHandle.cs
- RelationshipFixer.cs
- SqlRemoveConstantOrderBy.cs
- RegisteredExpandoAttribute.cs
- CryptoKeySecurity.cs
- NaturalLanguageHyphenator.cs
- X509Certificate.cs
- RequestCache.cs
- InputLanguageSource.cs
- SimpleHandlerFactory.cs
- IsolatedStorageException.cs
- ActiveXContainer.cs
- XmlSchemaComplexContent.cs
- SqlConnectionHelper.cs
- CLSCompliantAttribute.cs
- PeerPresenceInfo.cs
- odbcmetadatacollectionnames.cs
- BufferBuilder.cs
- codemethodreferenceexpression.cs
- ApplicationDirectory.cs
- RpcAsyncResult.cs
- RecognizerInfo.cs
- DomainUpDown.cs
- Compress.cs
- HasCopySemanticsAttribute.cs
- XPathMultyIterator.cs
- ReadingWritingEntityEventArgs.cs
- TreeNodeBindingCollection.cs
- DataBoundLiteralControl.cs
- PerformanceCounterPermissionAttribute.cs
- QilBinary.cs
- GridSplitter.cs
- ACL.cs
- Image.cs
- SymmetricKeyWrap.cs
- DES.cs
- ObjectDataSourceFilteringEventArgs.cs
- DebugHandleTracker.cs
- ObjectDataSourceMethodEditor.cs
- OuterGlowBitmapEffect.cs
- TranslateTransform3D.cs
- MultiBindingExpression.cs
- RegexWriter.cs