Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- RequestQueryProcessor.cs
- Roles.cs
- TextBoxView.cs
- MenuItemAutomationPeer.cs
- HandlerWithFactory.cs
- TreeViewImageKeyConverter.cs
- FixedSOMPageConstructor.cs
- TreePrinter.cs
- MailAddress.cs
- InitiatorServiceModelSecurityTokenRequirement.cs
- DocumentationServerProtocol.cs
- FixedPosition.cs
- WebBrowser.cs
- LineServicesRun.cs
- BackStopAuthenticationModule.cs
- DocumentReference.cs
- NetMsmqBindingElement.cs
- _FtpControlStream.cs
- ChangeProcessor.cs
- ByteRangeDownloader.cs
- TextEditorDragDrop.cs
- VariantWrapper.cs
- TextRange.cs
- PolyLineSegment.cs
- XmlImplementation.cs
- HttpCookieCollection.cs
- ProfileServiceManager.cs
- WindowsAuthenticationModule.cs
- ISFTagAndGuidCache.cs
- LeaseManager.cs
- ConfigXmlSignificantWhitespace.cs
- hresults.cs
- AccessDataSource.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- MsmqIntegrationReceiveParameters.cs
- X509Utils.cs
- TickBar.cs
- ExtensionQuery.cs
- TaskHelper.cs
- DescriptionAttribute.cs
- ArraySortHelper.cs
- Point3DValueSerializer.cs
- AuthorizationSection.cs
- MenuItemCollectionEditorDialog.cs
- XmlNodeList.cs
- CommentAction.cs
- Manipulation.cs
- DataGridItemEventArgs.cs
- SmtpReplyReaderFactory.cs
- BaseTemplateCodeDomTreeGenerator.cs
- FontInfo.cs
- BitmapVisualManager.cs
- StringReader.cs
- DispatcherProcessingDisabled.cs
- WebConfigurationFileMap.cs
- InstallerTypeAttribute.cs
- Win32Native.cs
- VBCodeProvider.cs
- TextInfo.cs
- ComponentDispatcherThread.cs
- FormsAuthentication.cs
- Utils.cs
- DbBuffer.cs
- DescendantBaseQuery.cs
- TabPage.cs
- SoapReflector.cs
- ManagedWndProcTracker.cs
- DrawingContextWalker.cs
- RegisteredDisposeScript.cs
- MessageHeaderDescription.cs
- hresults.cs
- RunInstallerAttribute.cs
- RtfToXamlReader.cs
- SymmetricAlgorithm.cs
- EntityCommandExecutionException.cs
- DynamicQueryableWrapper.cs
- WSFederationHttpSecurityElement.cs
- OdbcHandle.cs
- NativeMethodsCLR.cs
- Button.cs
- XmlArrayAttribute.cs
- PropertyTabChangedEvent.cs
- Keywords.cs
- PenLineJoinValidation.cs
- WebPartZone.cs
- ICollection.cs
- EncodingInfo.cs
- CurrentChangedEventManager.cs
- ObjectPersistData.cs
- CompModSwitches.cs
- TemplateXamlParser.cs
- ToolStripRenderEventArgs.cs
- StorageComplexTypeMapping.cs
- BinaryCommonClasses.cs
- httpstaticobjectscollection.cs
- SendReply.cs
- BrowserTree.cs
- DataGridViewCheckBoxColumn.cs
- XslTransform.cs
- CopyNamespacesAction.cs