Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- IntegerCollectionEditor.cs
- SqlTypeConverter.cs
- PropertyMapper.cs
- OSFeature.cs
- SimpleTypesSurrogate.cs
- _NegoStream.cs
- FixedSOMContainer.cs
- IgnorePropertiesAttribute.cs
- DataColumn.cs
- TextContainerChangedEventArgs.cs
- JsonGlobals.cs
- PenContext.cs
- FillErrorEventArgs.cs
- SqlCachedBuffer.cs
- IndicShape.cs
- CustomErrorCollection.cs
- ProcessModuleCollection.cs
- TextSelectionProcessor.cs
- DispatcherSynchronizationContext.cs
- DocumentScope.cs
- ConnectionProviderAttribute.cs
- ConsumerConnectionPointCollection.cs
- GeometryDrawing.cs
- SettingsSavedEventArgs.cs
- Operator.cs
- XmlCharacterData.cs
- XamlSerializer.cs
- HttpWrapper.cs
- CodeDOMUtility.cs
- ItemsPanelTemplate.cs
- DesignerForm.cs
- UserValidatedEventArgs.cs
- EncoderReplacementFallback.cs
- AsymmetricSignatureFormatter.cs
- IndentedWriter.cs
- SHA256.cs
- GiveFeedbackEventArgs.cs
- DaylightTime.cs
- RecipientInfo.cs
- TreeViewItem.cs
- TrustSection.cs
- OleDbDataAdapter.cs
- ScriptRegistrationManager.cs
- Hex.cs
- PanelDesigner.cs
- Point3D.cs
- ColumnMap.cs
- Fx.cs
- DataGridRowEventArgs.cs
- ConfigurationManagerInternalFactory.cs
- Scalars.cs
- XmlSchemaDocumentation.cs
- Classification.cs
- TextEffectResolver.cs
- ConfigurationElementProperty.cs
- SerialPort.cs
- CultureMapper.cs
- PrtTicket_Public_Simple.cs
- ListDictionary.cs
- ButtonBase.cs
- XmlQueryCardinality.cs
- NamespaceInfo.cs
- CorrelationManager.cs
- ZipIOFileItemStream.cs
- FieldReference.cs
- dbdatarecord.cs
- WhitespaceRule.cs
- InvalidOperationException.cs
- DataGridViewCellPaintingEventArgs.cs
- TextStore.cs
- PtsHelper.cs
- ComAdminInterfaces.cs
- DataGridAddNewRow.cs
- SoapTypeAttribute.cs
- EntityTypeBase.cs
- BrushMappingModeValidation.cs
- XmlElementCollection.cs
- ConnectionConsumerAttribute.cs
- InputProcessorProfilesLoader.cs
- GenericPrincipal.cs
- ThreadPool.cs
- CatalogZone.cs
- InstancePersistence.cs
- WindowsUpDown.cs
- UnSafeCharBuffer.cs
- RequestCachePolicyConverter.cs
- PropertyMapper.cs
- hresults.cs
- ToolStripSplitButton.cs
- DynamicValidatorEventArgs.cs
- CodeSnippetStatement.cs
- DoubleConverter.cs
- COAUTHINFO.cs
- TransactionValidationBehavior.cs
- EmulateRecognizeCompletedEventArgs.cs
- SmtpCommands.cs
- ColumnMapTranslator.cs
- ClonableStack.cs
- ListViewCommandEventArgs.cs
- OracleConnection.cs