Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / Range.cs / 1305376 / 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
- GridToolTip.cs
- ImageList.cs
- XPathNodeInfoAtom.cs
- WebBrowserPermission.cs
- ListView.cs
- FastPropertyAccessor.cs
- _HeaderInfoTable.cs
- BitmapInitialize.cs
- oledbmetadatacolumnnames.cs
- InstanceHandle.cs
- Adorner.cs
- SigningCredentials.cs
- XPathDescendantIterator.cs
- Point3DAnimation.cs
- Utils.cs
- ListParagraph.cs
- TreeViewImageKeyConverter.cs
- BrowserTree.cs
- controlskin.cs
- Input.cs
- BindingGraph.cs
- InputQueue.cs
- OrderedDictionary.cs
- LogArchiveSnapshot.cs
- ContentType.cs
- TextRunProperties.cs
- TypeLibConverter.cs
- ImageUrlEditor.cs
- DeflateStream.cs
- cache.cs
- ComplexTypeEmitter.cs
- DataConnectionHelper.cs
- FormViewRow.cs
- CompilationLock.cs
- NaturalLanguageHyphenator.cs
- DesignerActionVerbItem.cs
- StandardCommands.cs
- ZipIOFileItemStream.cs
- StringBuilder.cs
- ImageList.cs
- Timeline.cs
- WebPartManagerDesigner.cs
- EventManager.cs
- DataGridViewRowHeaderCell.cs
- SystemThemeKey.cs
- ConfigXmlSignificantWhitespace.cs
- DataGridViewRowCancelEventArgs.cs
- ListViewHitTestInfo.cs
- SerializationSectionGroup.cs
- SlipBehavior.cs
- RtfNavigator.cs
- RangeValueProviderWrapper.cs
- MessageQueueCriteria.cs
- XPathNavigator.cs
- Token.cs
- XmlBoundElement.cs
- PersonalizationProvider.cs
- NotImplementedException.cs
- PrintDialog.cs
- MethodMessage.cs
- DisplayMemberTemplateSelector.cs
- QilExpression.cs
- Model3DGroup.cs
- GridViewAutomationPeer.cs
- BinaryConverter.cs
- TextMarkerSource.cs
- ConfigurationElement.cs
- DataListDesigner.cs
- XmlILModule.cs
- StyleXamlTreeBuilder.cs
- StylusPointProperties.cs
- DataControlHelper.cs
- VectorValueSerializer.cs
- InputMethodStateChangeEventArgs.cs
- StatementContext.cs
- XmlSchemaElement.cs
- TextFormatter.cs
- EpmSourcePathSegment.cs
- NamespaceExpr.cs
- AmbientValueAttribute.cs
- BitmapSource.cs
- SharedUtils.cs
- EdmToObjectNamespaceMap.cs
- Int32Converter.cs
- Documentation.cs
- CodeStatementCollection.cs
- WasHttpHandlersInstallComponent.cs
- DataGridView.cs
- TableLayoutStyleCollection.cs
- GridViewDeleteEventArgs.cs
- SolidColorBrush.cs
- TaskDesigner.cs
- QueryCacheManager.cs
- KeyBinding.cs
- PageStatePersister.cs
- OciEnlistContext.cs
- FileDialogCustomPlacesCollection.cs
- XPathPatternParser.cs
- ListenerSessionConnection.cs
- SurrogateEncoder.cs