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
- JournalEntry.cs
- UInt16.cs
- GregorianCalendar.cs
- GeneralTransform3DCollection.cs
- FormViewUpdatedEventArgs.cs
- OrderedDictionary.cs
- TypeInitializationException.cs
- EventMetadata.cs
- DataGridViewSelectedColumnCollection.cs
- PreviewKeyDownEventArgs.cs
- LinkArea.cs
- PingOptions.cs
- SQLUtility.cs
- WorkflowElementDialog.cs
- WindowsTab.cs
- PlatformCulture.cs
- OracleEncoding.cs
- CodeEntryPointMethod.cs
- ViewLoader.cs
- WorkflowRuntimeSection.cs
- PropVariant.cs
- FunctionMappingTranslator.cs
- ColorAnimation.cs
- StringCollectionEditor.cs
- FixedSOMSemanticBox.cs
- DataServiceQueryContinuation.cs
- DataGridColumn.cs
- DataListItemEventArgs.cs
- MetadataSource.cs
- AppDomainAttributes.cs
- HttpModuleAction.cs
- ControlUtil.cs
- PathFigureCollectionConverter.cs
- SchemaSetCompiler.cs
- TreeNodeBinding.cs
- MouseGestureValueSerializer.cs
- ObjectPersistData.cs
- WinCategoryAttribute.cs
- FileIOPermission.cs
- Query.cs
- LinqDataSourceDeleteEventArgs.cs
- HierarchicalDataSourceControl.cs
- FileIOPermission.cs
- FilteredReadOnlyMetadataCollection.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- Lock.cs
- SqlProfileProvider.cs
- __TransparentProxy.cs
- ValuePattern.cs
- GridViewRow.cs
- FileSystemWatcher.cs
- MembershipSection.cs
- XmlReflectionImporter.cs
- WindowVisualStateTracker.cs
- PropertyTab.cs
- WindowsGraphicsCacheManager.cs
- PropertyReferenceSerializer.cs
- IndicShape.cs
- ToolStripButton.cs
- Assert.cs
- ArrayWithOffset.cs
- CodeRemoveEventStatement.cs
- PageParserFilter.cs
- LinearKeyFrames.cs
- TrackingProfileSerializer.cs
- ConstNode.cs
- Serializer.cs
- XmlSchemaExporter.cs
- Attributes.cs
- Calendar.cs
- ProcessInputEventArgs.cs
- SourceFileBuildProvider.cs
- SignatureHelper.cs
- IconHelper.cs
- Parsers.cs
- DefaultProxySection.cs
- BinaryCommonClasses.cs
- EventLogPermissionAttribute.cs
- XmlTextReader.cs
- XPathDocument.cs
- Stackframe.cs
- MobileTextWriter.cs
- CryptoProvider.cs
- GroupBox.cs
- SerializationSectionGroup.cs
- ErrorEventArgs.cs
- EntityDataSourceViewSchema.cs
- _NetworkingPerfCounters.cs
- XmlSchemaExternal.cs
- DBCSCodePageEncoding.cs
- TypeToken.cs
- BasicKeyConstraint.cs
- RectAnimation.cs
- DataObjectEventArgs.cs
- Deserializer.cs
- RtfControlWordInfo.cs
- XPathBinder.cs
- CommandBindingCollection.cs
- SafeLocalMemHandle.cs
- DtdParser.cs