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
- GuidConverter.cs
- ClientConfigurationHost.cs
- SearchExpression.cs
- TreeSet.cs
- ModifiableIteratorCollection.cs
- Brush.cs
- IntPtr.cs
- ZipIOExtraFieldElement.cs
- NegationPusher.cs
- InternalPermissions.cs
- FormCollection.cs
- ProvidersHelper.cs
- RawStylusInputReport.cs
- InstanceDataCollectionCollection.cs
- IPEndPoint.cs
- XmlSchemaImport.cs
- EventProxy.cs
- RadioButtonPopupAdapter.cs
- HelpInfo.cs
- XmlDataImplementation.cs
- PageRequestManager.cs
- DataObjectFieldAttribute.cs
- EntityDataSourceState.cs
- CodeRemoveEventStatement.cs
- PixelFormats.cs
- IProvider.cs
- UnmanagedHandle.cs
- GB18030Encoding.cs
- GridViewPageEventArgs.cs
- TaiwanLunisolarCalendar.cs
- RSAOAEPKeyExchangeFormatter.cs
- XPathNodeIterator.cs
- ValidatingPropertiesEventArgs.cs
- Enum.cs
- StringSource.cs
- DuplicateDetector.cs
- AlphaSortedEnumConverter.cs
- FilterableAttribute.cs
- IndexingContentUnit.cs
- bindurihelper.cs
- OracleParameterBinding.cs
- DataObjectMethodAttribute.cs
- CollectionViewSource.cs
- UnmanagedMemoryStream.cs
- wmiprovider.cs
- ToolBarPanel.cs
- DataTablePropertyDescriptor.cs
- HWStack.cs
- GenericTypeParameterBuilder.cs
- TagElement.cs
- _NegotiateClient.cs
- AttachmentCollection.cs
- Enlistment.cs
- PageCatalogPart.cs
- UxThemeWrapper.cs
- SelectorItemAutomationPeer.cs
- InvalidateEvent.cs
- EditorZone.cs
- TextTreeObjectNode.cs
- Expression.cs
- ProfileManager.cs
- DataGridItem.cs
- IPHostEntry.cs
- XPathDocumentNavigator.cs
- XmlNavigatorFilter.cs
- WindowVisualStateTracker.cs
- TextEndOfLine.cs
- latinshape.cs
- IPipelineRuntime.cs
- SystemThemeKey.cs
- CaseInsensitiveHashCodeProvider.cs
- XmlSiteMapProvider.cs
- BufferedGraphics.cs
- initElementDictionary.cs
- HtmlWindow.cs
- MasterPageParser.cs
- DurableInstanceManager.cs
- FontWeightConverter.cs
- TextRangeSerialization.cs
- ToolStripPanelRenderEventArgs.cs
- EditorAttribute.cs
- DirectoryInfo.cs
- ZipIOExtraFieldElement.cs
- SoapExtensionTypeElementCollection.cs
- BrowserCapabilitiesCodeGenerator.cs
- ExtendedProperty.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- EntitySet.cs
- Stream.cs
- WebPartManagerInternals.cs
- CombinedTcpChannel.cs
- XpsDocumentEvent.cs
- PropertyCollection.cs
- DynamicFilter.cs
- ObjectCloneHelper.cs
- WebPartZone.cs
- DesignerEventService.cs
- ReadOnlyHierarchicalDataSource.cs
- HtmlInputControl.cs
- StrokeRenderer.cs