Code:
/ FX-1434 / FX-1434 / 1.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
- ComponentCommands.cs
- ExpressionParser.cs
- ClientTarget.cs
- SqlBuilder.cs
- ServiceObjectContainer.cs
- DefaultWorkflowSchedulerService.cs
- StorageEntitySetMapping.cs
- HostingEnvironment.cs
- ReferenceSchema.cs
- Form.cs
- NetCodeGroup.cs
- CollectionBuilder.cs
- PropertyGridView.cs
- CachedPathData.cs
- comcontractssection.cs
- CodeNamespaceImport.cs
- MDIClient.cs
- Int64Storage.cs
- ISCIIEncoding.cs
- Model3DGroup.cs
- DataError.cs
- TextPenaltyModule.cs
- AesManaged.cs
- SHA384Managed.cs
- ScriptControl.cs
- CroppedBitmap.cs
- RtType.cs
- ByValueEqualityComparer.cs
- ListenDesigner.cs
- ReachFixedDocumentSerializer.cs
- EncoderExceptionFallback.cs
- BinaryNegotiation.cs
- RuleElement.cs
- BatchParser.cs
- NativeMethods.cs
- ApplicationSecurityManager.cs
- StateMachineHistory.cs
- IPEndPoint.cs
- WorkflowRuntime.cs
- ResourceManager.cs
- HideDisabledControlAdapter.cs
- NativeMethods.cs
- TreeViewCancelEvent.cs
- TextElementEnumerator.cs
- XmlUtil.cs
- Relationship.cs
- DataContext.cs
- _RequestCacheProtocol.cs
- TrustSection.cs
- RegexParser.cs
- MulticastDelegate.cs
- FrameSecurityDescriptor.cs
- BasePropertyDescriptor.cs
- EntityContainerRelationshipSet.cs
- ButtonBaseDesigner.cs
- BrowserInteropHelper.cs
- TagMapCollection.cs
- EventListener.cs
- RangeContentEnumerator.cs
- _SslSessionsCache.cs
- ChannelManagerHelpers.cs
- RTLAwareMessageBox.cs
- CriticalFinalizerObject.cs
- DataViewManagerListItemTypeDescriptor.cs
- ResXResourceWriter.cs
- QuadTree.cs
- ValidationResult.cs
- DataGridViewIntLinkedList.cs
- ProtocolsConfigurationHandler.cs
- SelectedDatesCollection.cs
- HyperlinkAutomationPeer.cs
- GroupBox.cs
- CultureSpecificStringDictionary.cs
- MetricEntry.cs
- StreamReader.cs
- DirtyTextRange.cs
- Transform3DGroup.cs
- XPathNodePointer.cs
- ReflectionTypeLoadException.cs
- SymbolPair.cs
- DelegateSerializationHolder.cs
- MulticastOption.cs
- ListViewDeleteEventArgs.cs
- NullableIntAverageAggregationOperator.cs
- DesignerForm.cs
- WebInvokeAttribute.cs
- DocumentOrderQuery.cs
- Wizard.cs
- ColorBuilder.cs
- SQLBytes.cs
- HandledEventArgs.cs
- ResponseStream.cs
- AssemblyBuilder.cs
- AbstractSvcMapFileLoader.cs
- Resources.Designer.cs
- ScrollData.cs
- OpCopier.cs
- GradientStop.cs
- HttpFileCollection.cs
- PageCatalogPartDesigner.cs