Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- MetafileHeader.cs
- FunctionDescription.cs
- Models.cs
- UrlRoutingModule.cs
- NonParentingControl.cs
- XmlTypeAttribute.cs
- TypeViewSchema.cs
- AutomationPropertyInfo.cs
- IntranetCredentialPolicy.cs
- SQLInt64.cs
- ActivationProxy.cs
- ExpressionVisitorHelpers.cs
- GenericsInstances.cs
- ListControlStringCollectionEditor.cs
- StreamUpdate.cs
- LinqDataSource.cs
- TypeToken.cs
- PseudoWebRequest.cs
- RegexCompiler.cs
- Path.cs
- ImpersonationContext.cs
- GridViewColumnHeaderAutomationPeer.cs
- PenThreadWorker.cs
- BatchWriter.cs
- Screen.cs
- HttpRawResponse.cs
- FixedPageProcessor.cs
- ObjectDataSourceFilteringEventArgs.cs
- TransactionCache.cs
- Rfc2898DeriveBytes.cs
- WebConfigurationFileMap.cs
- LoginName.cs
- SmiContext.cs
- HotSpot.cs
- SqlWebEventProvider.cs
- RuntimeArgumentHandle.cs
- Model3DGroup.cs
- SoapIncludeAttribute.cs
- FontCollection.cs
- IdentityHolder.cs
- GroupBox.cs
- ElementHost.cs
- EventLogQuery.cs
- RequestUriProcessor.cs
- DelegateSerializationHolder.cs
- InvalidCommandTreeException.cs
- HttpBrowserCapabilitiesWrapper.cs
- ArrayElementGridEntry.cs
- CapabilitiesState.cs
- PropertyDescriptorComparer.cs
- Int16KeyFrameCollection.cs
- CatalogPartChrome.cs
- AmbientLight.cs
- ObjectKeyFrameCollection.cs
- OutputCacheSection.cs
- AQNBuilder.cs
- XhtmlBasicValidationSummaryAdapter.cs
- BindingSource.cs
- HuffCodec.cs
- SerializationFieldInfo.cs
- PropertyInformationCollection.cs
- DataGridTableStyleMappingNameEditor.cs
- PageAsyncTaskManager.cs
- LineInfo.cs
- EntityProviderFactory.cs
- ReceiveMessageContent.cs
- SqlComparer.cs
- ReferenceSchema.cs
- DataGridViewImageColumn.cs
- SqlCommand.cs
- HttpContextServiceHost.cs
- HtmlButton.cs
- ArrayConverter.cs
- FontStyles.cs
- BehaviorDragDropEventArgs.cs
- PropertyTabAttribute.cs
- XhtmlStyleClass.cs
- LinkButton.cs
- CopyOnWriteList.cs
- OptimizedTemplateContentHelper.cs
- IApplicationTrustManager.cs
- TemplateBindingExpression.cs
- EditingMode.cs
- ObjectConverter.cs
- ImageListUtils.cs
- RolePrincipal.cs
- AuthenticationService.cs
- HashCodeCombiner.cs
- SafeHandle.cs
- XomlCompilerError.cs
- SqlRecordBuffer.cs
- AppDomainAttributes.cs
- DataRecordObjectView.cs
- DPTypeDescriptorContext.cs
- AuthorizationRuleCollection.cs
- WindowInteropHelper.cs
- Attributes.cs
- KeyBinding.cs
- PropertyEmitter.cs
- ImageMetadata.cs