Code:
/ FX-1434 / FX-1434 / 1.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
- AnimationStorage.cs
- FindCriteriaCD1.cs
- AsymmetricKeyExchangeFormatter.cs
- _NegoState.cs
- DateTimeValueSerializerContext.cs
- MbpInfo.cs
- XmlDataSource.cs
- TokenCreationException.cs
- EntitySqlException.cs
- SecurityContextKeyIdentifierClause.cs
- XmlMembersMapping.cs
- EventMappingSettings.cs
- LoadWorkflowByKeyAsyncResult.cs
- PtsCache.cs
- _ListenerAsyncResult.cs
- BuildManagerHost.cs
- EntityDataSourceContainerNameItem.cs
- _ProxyRegBlob.cs
- ItemsChangedEventArgs.cs
- APCustomTypeDescriptor.cs
- OdbcConnectionStringbuilder.cs
- UIElement3D.cs
- IResourceProvider.cs
- StrokeCollectionConverter.cs
- ByteAnimationUsingKeyFrames.cs
- OLEDB_Enum.cs
- DefaultBinder.cs
- CountAggregationOperator.cs
- CombinedHttpChannel.cs
- UnSafeCharBuffer.cs
- BufferModesCollection.cs
- LoginUtil.cs
- AdornerDecorator.cs
- RSAProtectedConfigurationProvider.cs
- LeaseManager.cs
- BeginGetFileNameFromUserRequest.cs
- QueryResponse.cs
- StreamGeometryContext.cs
- HttpRequestCacheValidator.cs
- Utils.cs
- NameValueFileSectionHandler.cs
- InputMethodStateTypeInfo.cs
- Boolean.cs
- RootBuilder.cs
- EntityExpressionVisitor.cs
- XmlTextAttribute.cs
- XmlAttributes.cs
- XPathDocumentNavigator.cs
- SectionUpdates.cs
- PointLightBase.cs
- TTSVoice.cs
- ZoneIdentityPermission.cs
- ActivityDesignerAccessibleObject.cs
- Span.cs
- ChangeTracker.cs
- XpsFilter.cs
- Statements.cs
- SqlSupersetValidator.cs
- SQLStringStorage.cs
- PasswordPropertyTextAttribute.cs
- CopyOnWriteList.cs
- CalendarTable.cs
- Attributes.cs
- XmlSerializerObjectSerializer.cs
- OleDbErrorCollection.cs
- EmptyQuery.cs
- SessionPageStateSection.cs
- ConfigXmlSignificantWhitespace.cs
- KnownTypesHelper.cs
- XMLDiffLoader.cs
- OperationCanceledException.cs
- KnownTypes.cs
- WebBrowserProgressChangedEventHandler.cs
- ChannelServices.cs
- BamlLocalizabilityResolver.cs
- ArrangedElement.cs
- ContentIterators.cs
- RuntimeHelpers.cs
- HierarchicalDataTemplate.cs
- ArrowControl.xaml.cs
- DesignerDataRelationship.cs
- DbReferenceCollection.cs
- PtsCache.cs
- KeyInfo.cs
- AnimationLayer.cs
- TreeView.cs
- ToolboxComponentsCreatedEventArgs.cs
- ViewValidator.cs
- DataBoundLiteralControl.cs
- ObjectNavigationPropertyMapping.cs
- ZeroOpNode.cs
- IIS7WorkerRequest.cs
- DataGridViewCellPaintingEventArgs.cs
- DataSourceCache.cs
- DesignerHierarchicalDataSourceView.cs
- DataColumnMapping.cs
- PackUriHelper.cs
- ImagingCache.cs
- ErrorCodes.cs
- ImageCollectionCodeDomSerializer.cs