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
- ControlCollection.cs
- XPathScanner.cs
- ClientBuildManager.cs
- pingexception.cs
- TimeEnumHelper.cs
- CleanUpVirtualizedItemEventArgs.cs
- XmlSerializableServices.cs
- JsonFormatReaderGenerator.cs
- XmlSchemaAll.cs
- _SSPIWrapper.cs
- CommandField.cs
- TypeSystemProvider.cs
- IndexedEnumerable.cs
- TraceUtility.cs
- DiagnosticsConfiguration.cs
- HashSetDebugView.cs
- ResizeBehavior.cs
- WebBaseEventKeyComparer.cs
- ControlTemplate.cs
- TypeSystemHelpers.cs
- CustomValidator.cs
- ListViewDeletedEventArgs.cs
- VisualStyleElement.cs
- XmlReaderSettings.cs
- TextBox.cs
- NotCondition.cs
- ColumnMapCopier.cs
- SourceFilter.cs
- BitmapEffectDrawing.cs
- SqlRemoveConstantOrderBy.cs
- Expr.cs
- SmiMetaDataProperty.cs
- SiteMapDataSource.cs
- QueryOpeningEnumerator.cs
- StreamAsIStream.cs
- EncoderExceptionFallback.cs
- ProgressBarHighlightConverter.cs
- CfgRule.cs
- XmlHierarchyData.cs
- AddDataControlFieldDialog.cs
- Select.cs
- HttpRequest.cs
- InteropExecutor.cs
- GridView.cs
- Constraint.cs
- PageWrapper.cs
- WebPartTracker.cs
- BitmapEffectDrawingContextState.cs
- WpfGeneratedKnownProperties.cs
- Int32.cs
- CompilerGeneratedAttribute.cs
- FieldTemplateUserControl.cs
- HtmlImage.cs
- ColorConvertedBitmapExtension.cs
- DataControlFieldHeaderCell.cs
- EncoderNLS.cs
- RequestValidator.cs
- DocumentPageHost.cs
- HttpResponseHeader.cs
- HMACMD5.cs
- LinkButton.cs
- RoleManagerEventArgs.cs
- VirtualPathUtility.cs
- HuffmanTree.cs
- DayRenderEvent.cs
- SmtpDigestAuthenticationModule.cs
- AsyncDataRequest.cs
- TraceSource.cs
- StringResourceManager.cs
- WebPartConnectionsCloseVerb.cs
- SerializationFieldInfo.cs
- SafeNativeMethods.cs
- MimeParameters.cs
- HistoryEventArgs.cs
- ClientData.cs
- GridViewSelectEventArgs.cs
- PageStatePersister.cs
- DetailsViewPagerRow.cs
- ScriptMethodAttribute.cs
- RTLAwareMessageBox.cs
- ConfigPathUtility.cs
- SemanticBasicElement.cs
- TextureBrush.cs
- XmlValidatingReader.cs
- TrustLevel.cs
- ColumnResizeUndoUnit.cs
- HotSpot.cs
- ByteConverter.cs
- KeyedHashAlgorithm.cs
- OracleBoolean.cs
- VectorAnimationUsingKeyFrames.cs
- ByteStreamGeometryContext.cs
- BuildProviderUtils.cs
- Native.cs
- HttpListener.cs
- XmlUtil.cs
- CornerRadius.cs
- DataExpression.cs
- SponsorHelper.cs
- EncodedStreamFactory.cs