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
- Pkcs7Signer.cs
- PriorityRange.cs
- BamlWriter.cs
- Resources.Designer.cs
- DataGridColumn.cs
- BindingNavigator.cs
- SchemaCollectionPreprocessor.cs
- TrackBarRenderer.cs
- SymLanguageVendor.cs
- PoisonMessageException.cs
- PatternMatcher.cs
- RuleInfoComparer.cs
- SingleObjectCollection.cs
- QueryContinueDragEvent.cs
- XmlBinaryReader.cs
- ExceptionUtil.cs
- PropertiesTab.cs
- HtmlDocument.cs
- httpserverutility.cs
- XmlChildNodes.cs
- TypeRestriction.cs
- D3DImage.cs
- SchemaImporterExtensionElementCollection.cs
- ICspAsymmetricAlgorithm.cs
- TimelineGroup.cs
- RelationshipNavigation.cs
- DesignerWidgets.cs
- Parameter.cs
- BitmapPalette.cs
- StaticResourceExtension.cs
- SatelliteContractVersionAttribute.cs
- HttpProcessUtility.cs
- Int32Rect.cs
- DropShadowBitmapEffect.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- MachineKeyConverter.cs
- GlyphInfoList.cs
- TreeViewHitTestInfo.cs
- HttpConfigurationSystem.cs
- CompositeFontParser.cs
- SetterBase.cs
- FormattedTextSymbols.cs
- EventDescriptor.cs
- WsdlImporterElement.cs
- SymLanguageVendor.cs
- RubberbandSelector.cs
- EventHandlingScope.cs
- ObjectStorage.cs
- RuleElement.cs
- ProofTokenCryptoHandle.cs
- KeyConstraint.cs
- SiteMapNode.cs
- NumberAction.cs
- TextBoxBase.cs
- CodeChecksumPragma.cs
- ModifierKeysConverter.cs
- StoreContentChangedEventArgs.cs
- PackagePart.cs
- TimelineGroup.cs
- BrowserTree.cs
- ExtenderControl.cs
- QilPatternFactory.cs
- ServiceObjectContainer.cs
- Win32Native.cs
- ZipIOLocalFileBlock.cs
- ToolStripDropDownItem.cs
- UIElement.cs
- SettingsPropertyValueCollection.cs
- SchemaExporter.cs
- XDeferredAxisSource.cs
- Base64Encoder.cs
- CompositeCollection.cs
- PageCodeDomTreeGenerator.cs
- XPathSelfQuery.cs
- StubHelpers.cs
- XamlToRtfWriter.cs
- ObjectViewFactory.cs
- sqlinternaltransaction.cs
- DocumentViewer.cs
- QilIterator.cs
- AtomParser.cs
- WebPartHelpVerb.cs
- RNGCryptoServiceProvider.cs
- Operand.cs
- CryptoApi.cs
- CodeAttachEventStatement.cs
- SocketException.cs
- UrlAuthorizationModule.cs
- CheckBoxList.cs
- SiteMap.cs
- Underline.cs
- AvtEvent.cs
- OrderedDictionaryStateHelper.cs
- NativeWindow.cs
- CompilerResults.cs
- MetadataCacheItem.cs
- Splitter.cs
- Hex.cs
- SafeProcessHandle.cs
- OleDbConnectionPoolGroupProviderInfo.cs