Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LambdaCompiler.Unary.cs
- ThreadExceptionEvent.cs
- MetabaseReader.cs
- ContentType.cs
- StringAttributeCollection.cs
- NamedElement.cs
- EntityContainerAssociationSet.cs
- SourceFileBuildProvider.cs
- AtlasWeb.Designer.cs
- CopyNamespacesAction.cs
- PartialCachingControl.cs
- EventSetterHandlerConverter.cs
- SecurityKeyIdentifierClause.cs
- ClientSettings.cs
- Authorization.cs
- ExtractorMetadata.cs
- UrlPropertyAttribute.cs
- IListConverters.cs
- WindowsAltTab.cs
- BitmapScalingModeValidation.cs
- WorkflowNamespace.cs
- RunClient.cs
- WebPartDescription.cs
- SmtpAuthenticationManager.cs
- StreamUpdate.cs
- TableLayoutColumnStyleCollection.cs
- LogStream.cs
- BamlLocalizer.cs
- SqlMetaData.cs
- Faults.cs
- TraceProvider.cs
- IsolationInterop.cs
- HttpModule.cs
- RuntimeArgumentHandle.cs
- RangeBaseAutomationPeer.cs
- UnmanagedMemoryAccessor.cs
- WebPartZoneCollection.cs
- SliderAutomationPeer.cs
- SubtreeProcessor.cs
- BevelBitmapEffect.cs
- OrderByQueryOptionExpression.cs
- FontResourceCache.cs
- DelegateSerializationHolder.cs
- COM2Properties.cs
- HideDisabledControlAdapter.cs
- ToolBar.cs
- TabRenderer.cs
- TaskbarItemInfo.cs
- wgx_render.cs
- DataServiceClientException.cs
- SiblingIterators.cs
- ColumnResizeAdorner.cs
- FixedHighlight.cs
- HtmlInputReset.cs
- ExpressionValueEditor.cs
- SqlTriggerAttribute.cs
- ProgressBarRenderer.cs
- DictionaryBase.cs
- Operators.cs
- CatalogPart.cs
- GlyphRunDrawing.cs
- SplitterCancelEvent.cs
- Debug.cs
- ListDesigner.cs
- SchemaNamespaceManager.cs
- PostBackOptions.cs
- InternalDispatchObject.cs
- XmlMemberMapping.cs
- MsmqUri.cs
- VectorAnimationBase.cs
- CryptoProvider.cs
- LineServicesCallbacks.cs
- SemanticKeyElement.cs
- HelpEvent.cs
- CustomError.cs
- counter.cs
- EntityDescriptor.cs
- PrincipalPermission.cs
- BitmapEffectDrawing.cs
- OSEnvironmentHelper.cs
- LocationUpdates.cs
- SecurityContext.cs
- Accessors.cs
- XmlRawWriter.cs
- IPAddress.cs
- SaveCardRequest.cs
- PrintPreviewDialog.cs
- Empty.cs
- BookmarkOptionsHelper.cs
- TdsParser.cs
- SafeHandles.cs
- MinimizableAttributeTypeConverter.cs
- CodeVariableDeclarationStatement.cs
- FactorySettingsElement.cs
- WebDisplayNameAttribute.cs
- DeleteIndexBinder.cs
- CodeDelegateInvokeExpression.cs
- MetadataItemSerializer.cs
- TableRowCollection.cs
- IgnoreFileBuildProvider.cs