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
- EmptyElement.cs
- WebPartZone.cs
- OleDbConnection.cs
- CommentAction.cs
- Contracts.cs
- AssemblyBuilder.cs
- Columns.cs
- ByteStack.cs
- OracleParameterCollection.cs
- PngBitmapEncoder.cs
- OdbcInfoMessageEvent.cs
- RepeaterItem.cs
- LinqDataView.cs
- NativeMethods.cs
- Util.cs
- HtmlTableRow.cs
- AuthenticationSection.cs
- ExpressionDumper.cs
- SizeF.cs
- XPathSingletonIterator.cs
- SafeNativeMethods.cs
- WindowsListViewGroup.cs
- FramingChannels.cs
- XmlQueryOutput.cs
- ReadOnlyHierarchicalDataSourceView.cs
- EllipseGeometry.cs
- SoapWriter.cs
- ToolStripHighContrastRenderer.cs
- CopyOfAction.cs
- CSharpCodeProvider.cs
- TranslateTransform3D.cs
- Parser.cs
- PageSetupDialog.cs
- ObfuscateAssemblyAttribute.cs
- ByteKeyFrameCollection.cs
- GeometryCollection.cs
- TraceEventCache.cs
- EntryPointNotFoundException.cs
- WaitHandle.cs
- MarginCollapsingState.cs
- ObjectKeyFrameCollection.cs
- SplineQuaternionKeyFrame.cs
- DeliveryRequirementsAttribute.cs
- UserControlBuildProvider.cs
- XmlCDATASection.cs
- DBConcurrencyException.cs
- AvTraceDetails.cs
- MessageSmuggler.cs
- Formatter.cs
- AudioFormatConverter.cs
- PatternMatcher.cs
- HtmlGenericControl.cs
- ByeMessageCD1.cs
- Pair.cs
- AccessDataSourceDesigner.cs
- ReadWriteSpinLock.cs
- ProcessHostMapPath.cs
- HttpRequest.cs
- CssStyleCollection.cs
- AssociationType.cs
- SystemIPAddressInformation.cs
- ScriptingRoleServiceSection.cs
- AuthenticationSection.cs
- RouteParametersHelper.cs
- SubtreeProcessor.cs
- XmlChoiceIdentifierAttribute.cs
- CroppedBitmap.cs
- CodeChecksumPragma.cs
- ReadOnlyDictionary.cs
- HtmlTableRow.cs
- TreeView.cs
- XmlSchemaImport.cs
- NamespaceList.cs
- SecurityTokenContainer.cs
- PathSegmentCollection.cs
- PersonalizableAttribute.cs
- XmlSchemaInfo.cs
- CodeValidator.cs
- DataServiceProcessingPipeline.cs
- Point.cs
- EpmHelper.cs
- HashCoreRequest.cs
- DbConnectionPool.cs
- ConnectionManagementElementCollection.cs
- BasicViewGenerator.cs
- XPathDocumentNavigator.cs
- StrongNamePublicKeyBlob.cs
- DetailsViewPageEventArgs.cs
- Button.cs
- Int32KeyFrameCollection.cs
- CollectionBase.cs
- XmlDomTextWriter.cs
- BuildTopDownAttribute.cs
- StateWorkerRequest.cs
- WebPartTransformer.cs
- BoundColumn.cs
- MarkupCompiler.cs
- CompiledQuery.cs
- Property.cs
- COM2IPerPropertyBrowsingHandler.cs