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
- ViewStateModeByIdAttribute.cs
- UInt64.cs
- JsonGlobals.cs
- SerializationStore.cs
- CodeCompiler.cs
- FramingChannels.cs
- HttpAsyncResult.cs
- COM2IPerPropertyBrowsingHandler.cs
- ParameterCollection.cs
- TraceListeners.cs
- DetailsView.cs
- ReadOnlyHierarchicalDataSource.cs
- DiscreteKeyFrames.cs
- SubclassTypeValidatorAttribute.cs
- ProfilePropertySettingsCollection.cs
- DisposableCollectionWrapper.cs
- LassoSelectionBehavior.cs
- EventLogPermissionAttribute.cs
- ComponentDispatcherThread.cs
- sqlpipe.cs
- XhtmlBasicCommandAdapter.cs
- CompletedAsyncResult.cs
- EditBehavior.cs
- ItemsControlAutomationPeer.cs
- nulltextnavigator.cs
- SettingsSection.cs
- XmlQueryStaticData.cs
- HttpSessionStateBase.cs
- Image.cs
- NamedPipeAppDomainProtocolHandler.cs
- ImageConverter.cs
- WindowsIPAddress.cs
- SqlRowUpdatingEvent.cs
- MappingSource.cs
- CustomAttributeBuilder.cs
- PassportAuthenticationEventArgs.cs
- PcmConverter.cs
- iisPickupDirectory.cs
- XamlPathDataSerializer.cs
- Int16AnimationUsingKeyFrames.cs
- SqlProcedureAttribute.cs
- OrderByQueryOptionExpression.cs
- StringUtil.cs
- Currency.cs
- HostProtectionPermission.cs
- HotSpot.cs
- TabletDevice.cs
- Itemizer.cs
- DecimalConstantAttribute.cs
- LambdaCompiler.Logical.cs
- ServiceBusyException.cs
- MinMaxParagraphWidth.cs
- DataControlField.cs
- EdmSchemaAttribute.cs
- SafeEventLogWriteHandle.cs
- DataColumnMapping.cs
- DataControlCommands.cs
- AsyncResult.cs
- ClientData.cs
- HealthMonitoringSectionHelper.cs
- ExpressionConverter.cs
- BeginGetFileNameFromUserRequest.cs
- GridLength.cs
- DesignBindingValueUIHandler.cs
- XpsViewerException.cs
- SelectionGlyphBase.cs
- AttributeConverter.cs
- DynamicILGenerator.cs
- PageWrapper.cs
- DbConnectionPoolGroup.cs
- RsaSecurityTokenAuthenticator.cs
- AutomationPatternInfo.cs
- PointConverter.cs
- WebPartZoneCollection.cs
- RadioButtonList.cs
- SelectionItemProviderWrapper.cs
- UpdatePanelTriggerCollection.cs
- XPathQilFactory.cs
- LinkedResource.cs
- ClassImporter.cs
- FloaterBaseParagraph.cs
- InternalCompensate.cs
- PointKeyFrameCollection.cs
- SerializationEventsCache.cs
- MessageSecurityProtocol.cs
- TextBounds.cs
- RowUpdatingEventArgs.cs
- ISAPIApplicationHost.cs
- CaseStatementSlot.cs
- EncryptedPackage.cs
- Ipv6Element.cs
- Message.cs
- PassportIdentity.cs
- WorkflowApplicationCompletedEventArgs.cs
- TextSegment.cs
- BooleanSwitch.cs
- ProfileBuildProvider.cs
- PointAnimationUsingPath.cs
- DataObject.cs
- XmlTextWriter.cs