Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Baml2006Reader.cs
- GenericRootAutomationPeer.cs
- XsdBuilder.cs
- Transform.cs
- MessageProtectionOrder.cs
- MDIWindowDialog.cs
- MetadataArtifactLoaderFile.cs
- DataListItemCollection.cs
- SoapSchemaExporter.cs
- LogRecordSequence.cs
- StorageFunctionMapping.cs
- NetworkInterface.cs
- FixedDocument.cs
- SQLCharsStorage.cs
- ImageAttributes.cs
- ArrangedElementCollection.cs
- ISessionStateStore.cs
- _SslState.cs
- DependencyPropertyHelper.cs
- SqlMethodAttribute.cs
- TransactionValidationBehavior.cs
- SqlConnectionPoolProviderInfo.cs
- AuthenticationManager.cs
- WorkflowPersistenceService.cs
- StringDictionary.cs
- DataBoundLiteralControl.cs
- configsystem.cs
- SubstitutionList.cs
- SafeSecurityHandles.cs
- TextContainerHelper.cs
- CharEntityEncoderFallback.cs
- ParserOptions.cs
- DataGridViewCellMouseEventArgs.cs
- StaticSiteMapProvider.cs
- Parallel.cs
- ScrollData.cs
- MouseEventArgs.cs
- BamlLocalizabilityResolver.cs
- TextOptions.cs
- ErrorTableItemStyle.cs
- ColorComboBox.cs
- MessageSmuggler.cs
- ProjectionPathSegment.cs
- TimeoutTimer.cs
- DataStreamFromComStream.cs
- ResourcePermissionBaseEntry.cs
- PngBitmapDecoder.cs
- SizeAnimationUsingKeyFrames.cs
- TextEditorMouse.cs
- XslVisitor.cs
- FigureParagraph.cs
- ToolStripDropDown.cs
- ObjectQuery_EntitySqlExtensions.cs
- Serializer.cs
- BasicKeyConstraint.cs
- RotateTransform3D.cs
- Journal.cs
- TableStyle.cs
- CalendarDateChangedEventArgs.cs
- TdsParserHelperClasses.cs
- WriteTimeStream.cs
- PackageFilter.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- CodePropertyReferenceExpression.cs
- DateTimeFormatInfo.cs
- ClassGenerator.cs
- LinqDataSourceDisposeEventArgs.cs
- FactoryGenerator.cs
- UntypedNullExpression.cs
- GlobalizationAssembly.cs
- HyperLinkField.cs
- BlobPersonalizationState.cs
- DataGridViewCellPaintingEventArgs.cs
- BulletedListEventArgs.cs
- MonitorWrapper.cs
- GlyphRun.cs
- ComboBoxRenderer.cs
- Column.cs
- TreeWalkHelper.cs
- XsltQilFactory.cs
- SQLCharsStorage.cs
- MaskInputRejectedEventArgs.cs
- PerformanceCounterPermission.cs
- TreeNodeClickEventArgs.cs
- safelink.cs
- TextElementEditingBehaviorAttribute.cs
- TdsParserStateObject.cs
- ResizeGrip.cs
- ObjectListShowCommandsEventArgs.cs
- PageBreakRecord.cs
- ClientConfigPaths.cs
- WebBrowserSiteBase.cs
- FileLogRecordEnumerator.cs
- SelectionManager.cs
- PartitionedStream.cs
- RegexCode.cs
- SqlDataSourceStatusEventArgs.cs
- EDesignUtil.cs
- TcpPortSharing.cs
- RecordsAffectedEventArgs.cs