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
- BuildProvider.cs
- Signature.cs
- TableColumnCollection.cs
- HGlobalSafeHandle.cs
- MetadataPropertyCollection.cs
- EventLogEntryCollection.cs
- TextBox.cs
- CodeArgumentReferenceExpression.cs
- ValidationHelper.cs
- NavigationWindowAutomationPeer.cs
- ViewGenResults.cs
- DataGridTable.cs
- StylusPointProperty.cs
- GroupLabel.cs
- ZipFileInfoCollection.cs
- TreeViewDataItemAutomationPeer.cs
- FixedStringLookup.cs
- DataServiceRequestException.cs
- EmptyStringExpandableObjectConverter.cs
- Currency.cs
- TokenBasedSet.cs
- DataStreams.cs
- CacheModeValueSerializer.cs
- _NestedSingleAsyncResult.cs
- HttpDigestClientCredential.cs
- ReflectionTypeLoadException.cs
- HuffCodec.cs
- TransportContext.cs
- BooleanConverter.cs
- Rect3D.cs
- PhysicalAddress.cs
- XPathPatternParser.cs
- URLString.cs
- OleDbConnection.cs
- FullTextBreakpoint.cs
- InkCanvasSelection.cs
- CacheRequest.cs
- Profiler.cs
- MetadataArtifactLoader.cs
- Point3D.cs
- EncryptedData.cs
- EventPropertyMap.cs
- DefaultEventAttribute.cs
- DetailsViewActionList.cs
- ColorComboBox.cs
- MdImport.cs
- EventHandlersStore.cs
- ScrollBarAutomationPeer.cs
- PropertyConverter.cs
- SoundPlayer.cs
- QuotedStringFormatReader.cs
- TraceSource.cs
- ServiceReference.cs
- HtmlToClrEventProxy.cs
- DataGridCaption.cs
- LocalizationCodeDomSerializer.cs
- MailAddressCollection.cs
- EventLogSession.cs
- XmlSchemaAnyAttribute.cs
- PartialCachingControl.cs
- CodeMethodReturnStatement.cs
- OleDbEnumerator.cs
- LineBreak.cs
- GregorianCalendarHelper.cs
- assertwrapper.cs
- Setter.cs
- QilVisitor.cs
- SiteIdentityPermission.cs
- StateRuntime.cs
- DataBindingList.cs
- SafeWaitHandle.cs
- XhtmlMobileTextWriter.cs
- TraceListener.cs
- SiteMapHierarchicalDataSourceView.cs
- TagMapCollection.cs
- LexicalChunk.cs
- RegexRunner.cs
- DataProtection.cs
- DataRowComparer.cs
- COM2PropertyPageUITypeConverter.cs
- DecimalAnimationBase.cs
- HandlerFactoryWrapper.cs
- SynchronizationLockException.cs
- XmlSchemaCollection.cs
- Encoder.cs
- XmlSchemaSimpleContentRestriction.cs
- UrlPath.cs
- PLINQETWProvider.cs
- TableProviderWrapper.cs
- VisemeEventArgs.cs
- ProviderSettings.cs
- CompiledIdentityConstraint.cs
- httpserverutility.cs
- CompilationRelaxations.cs
- EntryWrittenEventArgs.cs
- SkewTransform.cs
- validation.cs
- TypeSource.cs
- ExecutedRoutedEventArgs.cs
- XhtmlBasicFormAdapter.cs