Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- DataServiceHost.cs
- PasswordBoxAutomationPeer.cs
- QuarticEase.cs
- RawStylusInputReport.cs
- WebPartTransformerAttribute.cs
- WebUtil.cs
- CacheDependency.cs
- TemplateBindingExtensionConverter.cs
- FixedSOMContainer.cs
- QilValidationVisitor.cs
- StateDesigner.CommentLayoutGlyph.cs
- ScrollData.cs
- SqlBulkCopyColumnMappingCollection.cs
- TypefaceMetricsCache.cs
- Validator.cs
- odbcmetadatacollectionnames.cs
- AuthenticateEventArgs.cs
- HandlerBase.cs
- MethodBody.cs
- IntranetCredentialPolicy.cs
- SqlCachedBuffer.cs
- AssemblyCollection.cs
- TextElementAutomationPeer.cs
- HttpProfileGroupBase.cs
- DataGridViewColumnStateChangedEventArgs.cs
- ProgramPublisher.cs
- EmbeddedMailObjectsCollection.cs
- WorkflowView.cs
- ParserExtension.cs
- ListViewGroup.cs
- DataGridParentRows.cs
- ConfigXmlElement.cs
- DebuggerAttributes.cs
- NativeRecognizer.cs
- BamlRecordHelper.cs
- DataGridViewButtonCell.cs
- MouseGestureValueSerializer.cs
- VisualTransition.cs
- TextServicesDisplayAttributePropertyRanges.cs
- CatalogZone.cs
- CodeSnippetExpression.cs
- TextEffectCollection.cs
- HandlerWithFactory.cs
- CultureTableRecord.cs
- MsmqBindingElementBase.cs
- BoundColumn.cs
- DataGridRowHeader.cs
- MailMessageEventArgs.cs
- LockedActivityGlyph.cs
- AesCryptoServiceProvider.cs
- sqlpipe.cs
- X509KeyIdentifierClauseType.cs
- ResourceSet.cs
- GenericAuthenticationEventArgs.cs
- SystemKeyConverter.cs
- WindowsTitleBar.cs
- FixedSOMPageConstructor.cs
- OperationInfoBase.cs
- WindowsStatic.cs
- DesignerValidationSummaryAdapter.cs
- DashStyle.cs
- Hashtable.cs
- SelectedDatesCollection.cs
- TypeToken.cs
- HttpChannelHelpers.cs
- ToolStripDropDownDesigner.cs
- ClrProviderManifest.cs
- SHA512Managed.cs
- ListViewItem.cs
- RenderingBiasValidation.cs
- TextSpanModifier.cs
- ListParaClient.cs
- ProfileEventArgs.cs
- ToolTipAutomationPeer.cs
- ThreadSafeList.cs
- PerformanceCounterManager.cs
- ColumnMap.cs
- CheckPair.cs
- XmlTextEncoder.cs
- XmlUtf8RawTextWriter.cs
- WebContext.cs
- SqlInternalConnection.cs
- AdRotator.cs
- SafeMemoryMappedFileHandle.cs
- SendSecurityHeaderElement.cs
- cryptoapiTransform.cs
- AsymmetricSignatureDeformatter.cs
- InheritanceContextHelper.cs
- ModuleConfigurationInfo.cs
- DictionarySectionHandler.cs
- SafeUserTokenHandle.cs
- _TransmitFileOverlappedAsyncResult.cs
- DataView.cs
- DbConnectionPoolIdentity.cs
- ValueTypeFixupInfo.cs
- PeerInputChannel.cs
- NativeMethods.cs
- ElementHost.cs
- HtmlTitle.cs
- RuleEngine.cs