Code:
/ DotNET / DotNET / 8.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
- CodeGroup.cs
- ActivityCodeDomSerializationManager.cs
- FixedDSBuilder.cs
- listviewsubitemcollectioneditor.cs
- HttpSocketManager.cs
- ProcessManager.cs
- FormsAuthenticationUserCollection.cs
- XmlIncludeAttribute.cs
- HttpCapabilitiesEvaluator.cs
- AggregateNode.cs
- AutoCompleteStringCollection.cs
- XmlAttributeCollection.cs
- SQLResource.cs
- altserialization.cs
- RegistryHandle.cs
- storagemappingitemcollection.viewdictionary.cs
- SingleAnimation.cs
- DecoderFallbackWithFailureFlag.cs
- StreamReader.cs
- FlowPanelDesigner.cs
- ConditionalWeakTable.cs
- MessageTraceRecord.cs
- OptimizerPatterns.cs
- CodeArrayIndexerExpression.cs
- ClientScriptManager.cs
- PropertyMappingExceptionEventArgs.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- FileEnumerator.cs
- MenuAutomationPeer.cs
- PeerCollaboration.cs
- SpecularMaterial.cs
- DbgUtil.cs
- DataContractSerializerFaultFormatter.cs
- LogicalExpr.cs
- IMembershipProvider.cs
- MethodBody.cs
- ProfileGroupSettingsCollection.cs
- XPathDescendantIterator.cs
- RightsController.cs
- PeekCompletedEventArgs.cs
- RubberbandSelector.cs
- SerializationStore.cs
- CurrencyManager.cs
- LocalTransaction.cs
- ReachFixedPageSerializer.cs
- IFlowDocumentViewer.cs
- CollaborationHelperFunctions.cs
- InternalConfigSettingsFactory.cs
- XPathMultyIterator.cs
- FileReservationCollection.cs
- KeyboardNavigation.cs
- DataTableReaderListener.cs
- SubstitutionList.cs
- PackageRelationshipSelector.cs
- GACMembershipCondition.cs
- GridViewHeaderRowPresenter.cs
- Pens.cs
- UnsafeNativeMethods.cs
- LineInfo.cs
- UnsafeNativeMethodsCLR.cs
- Visitors.cs
- XmlDocumentFragment.cs
- ListBoxItemAutomationPeer.cs
- MultiSelectRootGridEntry.cs
- SamlDoNotCacheCondition.cs
- TextTreeFixupNode.cs
- RequestQueue.cs
- ColorEditor.cs
- RawAppCommandInputReport.cs
- DataGridRowHeaderAutomationPeer.cs
- ControlsConfig.cs
- WSHttpBindingBase.cs
- AxisAngleRotation3D.cs
- X509Certificate.cs
- DriveNotFoundException.cs
- HwndSourceParameters.cs
- AppDomainManager.cs
- Accessible.cs
- FileUtil.cs
- EntityContainer.cs
- InputManager.cs
- CharAnimationBase.cs
- MultipleViewProviderWrapper.cs
- CharacterHit.cs
- TemplatedMailWebEventProvider.cs
- TextFormatterImp.cs
- DesignerForm.cs
- ToolStripContentPanel.cs
- ObjectListCommandsPage.cs
- CodeEntryPointMethod.cs
- DbParameterHelper.cs
- BaseUriWithWildcard.cs
- TableHeaderCell.cs
- VolatileEnlistmentMultiplexing.cs
- TemplateModeChangedEventArgs.cs
- CodeNamespaceImportCollection.cs
- newitemfactory.cs
- MemoryPressure.cs
- IIS7WorkerRequest.cs
- COM2ComponentEditor.cs