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
- PeerValidationBehavior.cs
- HttpRuntime.cs
- MetadataUtilsSmi.cs
- DocumentViewerBaseAutomationPeer.cs
- EntityDataSourceWrapperCollection.cs
- EntityDesignerDataSourceView.cs
- QilFactory.cs
- UrlAuthFailureHandler.cs
- DataErrorValidationRule.cs
- ChangeNode.cs
- FamilyCollection.cs
- TextFormatterImp.cs
- ObjectDataSourceStatusEventArgs.cs
- Opcode.cs
- Int32CAMarshaler.cs
- X509ClientCertificateAuthentication.cs
- TreeBuilder.cs
- HtmlUtf8RawTextWriter.cs
- AssemblyNameProxy.cs
- HttpCookie.cs
- UdpMessageProperty.cs
- CustomLineCap.cs
- SqlTriggerContext.cs
- BindingBase.cs
- DataControlLinkButton.cs
- LineSegment.cs
- UserPreferenceChangedEventArgs.cs
- UnaryQueryOperator.cs
- NativeMethods.cs
- HtmlTable.cs
- ConnectionAcceptor.cs
- TableProviderWrapper.cs
- ScrollChrome.cs
- TagPrefixAttribute.cs
- WSFederationHttpSecurity.cs
- DrawListViewColumnHeaderEventArgs.cs
- SelectionProviderWrapper.cs
- ImageInfo.cs
- ChtmlCalendarAdapter.cs
- FunctionNode.cs
- TextEffect.cs
- PolicyStatement.cs
- SqlConnectionPoolProviderInfo.cs
- GuidConverter.cs
- SettingsAttributeDictionary.cs
- ConversionValidationRule.cs
- OracleInternalConnection.cs
- XmlChildNodes.cs
- ColorMatrix.cs
- SystemUnicastIPAddressInformation.cs
- MessageQueue.cs
- XPathSingletonIterator.cs
- ConstantCheck.cs
- OleDbStruct.cs
- Vector.cs
- SQLMoneyStorage.cs
- XmlMemberMapping.cs
- KeyProperty.cs
- KeyEventArgs.cs
- XpsS0ValidatingLoader.cs
- SupportingTokenChannel.cs
- CurrentTimeZone.cs
- SafeMILHandle.cs
- HyperLinkField.cs
- MemoryMappedView.cs
- TextEndOfSegment.cs
- WindowsGraphicsWrapper.cs
- NetPeerTcpBindingCollectionElement.cs
- FontFamilyConverter.cs
- PersonalizationStateQuery.cs
- TreeWalkHelper.cs
- JournalEntryStack.cs
- CompositeScriptReference.cs
- DataGridViewComboBoxEditingControl.cs
- SafeNativeMethodsMilCoreApi.cs
- DbXmlEnabledProviderManifest.cs
- TextView.cs
- NavigationService.cs
- CodeAccessSecurityEngine.cs
- SecureEnvironment.cs
- ReferencedAssembly.cs
- FormattedTextSymbols.cs
- MsmqInputSessionChannel.cs
- FileUtil.cs
- MenuAdapter.cs
- Calendar.cs
- DbConnectionClosed.cs
- SimpleWebHandlerParser.cs
- TextServicesCompartment.cs
- TypedElement.cs
- CodeComment.cs
- WindowsListViewGroupHelper.cs
- InternalBufferOverflowException.cs
- QuaternionRotation3D.cs
- DbRetry.cs
- SchemaNamespaceManager.cs
- ConfigurationLoaderException.cs
- PagerSettings.cs
- ScriptReferenceEventArgs.cs
- FontCollection.cs