Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. // //[....] //[....] //[....] //----------------------------------------------------------------------------- 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
- RequestSecurityTokenForGetBrowserToken.cs
- GridViewAutomationPeer.cs
- TextWriter.cs
- PathFigure.cs
- ServerValidateEventArgs.cs
- XmlNode.cs
- EventProviderBase.cs
- XmlRawWriterWrapper.cs
- SqlFactory.cs
- CursorEditor.cs
- InvalidProgramException.cs
- NameTable.cs
- XamlPoint3DCollectionSerializer.cs
- DynamicDocumentPaginator.cs
- XmlSchemaAttribute.cs
- StrongNamePublicKeyBlob.cs
- BaseTemplateParser.cs
- Solver.cs
- StrongNameHelpers.cs
- IntegerValidatorAttribute.cs
- ListView.cs
- CodeMemberMethod.cs
- ObjectDataSourceFilteringEventArgs.cs
- HopperCache.cs
- GeneralTransform2DTo3D.cs
- WebCategoryAttribute.cs
- ConnectionStringsExpressionBuilder.cs
- HttpHeaderCollection.cs
- DeobfuscatingStream.cs
- ActivityWithResultConverter.cs
- ExpressionParser.cs
- CodeObjectCreateExpression.cs
- ActivityTrace.cs
- PngBitmapEncoder.cs
- XPathNodeInfoAtom.cs
- DbConnectionPoolCounters.cs
- KeyedHashAlgorithm.cs
- DefaultShape.cs
- ApplicationInterop.cs
- ZoneButton.cs
- DataTableMapping.cs
- MULTI_QI.cs
- SharedPerformanceCounter.cs
- PeerInputChannel.cs
- ObfuscationAttribute.cs
- HuffModule.cs
- EdmEntityTypeAttribute.cs
- ISFTagAndGuidCache.cs
- ConfigXmlWhitespace.cs
- ProgressiveCrcCalculatingStream.cs
- ProfileSection.cs
- ILGen.cs
- InheritanceContextHelper.cs
- DBPropSet.cs
- InternalResources.cs
- PlatformNotSupportedException.cs
- SynchronizationValidator.cs
- SafeRightsManagementHandle.cs
- HttpRequest.cs
- URLIdentityPermission.cs
- ImageMapEventArgs.cs
- ToolStripMenuItemCodeDomSerializer.cs
- AsyncDataRequest.cs
- DataGridViewLinkCell.cs
- PersonalizableAttribute.cs
- ISAPIApplicationHost.cs
- AsymmetricKeyExchangeFormatter.cs
- CertificateElement.cs
- ParagraphVisual.cs
- LineGeometry.cs
- SystemColors.cs
- Documentation.cs
- RowToParametersTransformer.cs
- PeerNameRegistration.cs
- AnonymousIdentificationSection.cs
- PropertyTabAttribute.cs
- BooleanStorage.cs
- XmlILModule.cs
- Adorner.cs
- BaseValidator.cs
- WebCodeGenerator.cs
- PostBackOptions.cs
- RequestCacheManager.cs
- ClientRequest.cs
- PackageStore.cs
- RecordConverter.cs
- MetadataArtifactLoaderCompositeResource.cs
- OracleConnection.cs
- ExpressionEvaluator.cs
- FormViewInsertEventArgs.cs
- TreeViewImageKeyConverter.cs
- ParameterElementCollection.cs
- FormViewUpdateEventArgs.cs
- DirectoryNotFoundException.cs
- FileChangesMonitor.cs
- SymLanguageVendor.cs
- NativeMethods.cs
- ResourceExpressionBuilder.cs
- SoundPlayerAction.cs
- NodeFunctions.cs