Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / Range.cs / 1305376 / 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
- ResetableIterator.cs
- GridLengthConverter.cs
- Transform3D.cs
- XslTransform.cs
- AlignmentXValidation.cs
- StylusCaptureWithinProperty.cs
- SetterBaseCollection.cs
- IUnknownConstantAttribute.cs
- ToolBar.cs
- Filter.cs
- DependencyPropertyAttribute.cs
- ToolStripDropDownClosedEventArgs.cs
- SHA1CryptoServiceProvider.cs
- FlowDocumentView.cs
- RedirectionProxy.cs
- PropertyIDSet.cs
- TransformerInfo.cs
- RowToFieldTransformer.cs
- HttpEncoder.cs
- DesignerCategoryAttribute.cs
- Brushes.cs
- ServiceOperationListItemList.cs
- PointConverter.cs
- CrossSiteScriptingValidation.cs
- CacheMemory.cs
- CoreSwitches.cs
- GroupItem.cs
- IndependentAnimationStorage.cs
- TerminatorSinks.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- Hyperlink.cs
- Rijndael.cs
- GZipDecoder.cs
- PersonalizationStateQuery.cs
- MailMessage.cs
- peersecuritysettings.cs
- BitmapCache.cs
- RadioButtonBaseAdapter.cs
- XmlAttributeOverrides.cs
- Rule.cs
- ValidationRuleCollection.cs
- AsyncResult.cs
- XmlSequenceWriter.cs
- ProtectedConfiguration.cs
- Vector3DIndependentAnimationStorage.cs
- WindowsFormsHelpers.cs
- StrongNameMembershipCondition.cs
- DataViewSettingCollection.cs
- RecognizerBase.cs
- ConnectionManagementSection.cs
- ArrayTypeMismatchException.cs
- ConfigurationElementProperty.cs
- DiscardableAttribute.cs
- MeasurementDCInfo.cs
- Completion.cs
- ComponentCollection.cs
- SqlBuilder.cs
- SecurityContext.cs
- BaseConfigurationRecord.cs
- ComponentConverter.cs
- BoundColumn.cs
- DataContractSerializerOperationFormatter.cs
- MonitorWrapper.cs
- ConfigurationConverterBase.cs
- VerificationException.cs
- DefaultBindingPropertyAttribute.cs
- ContractSearchPattern.cs
- ServerIdentity.cs
- PrintDialog.cs
- StateMachine.cs
- BlurBitmapEffect.cs
- PolicyImporterElementCollection.cs
- Perspective.cs
- ComplexObject.cs
- XmlNullResolver.cs
- relpropertyhelper.cs
- AddInBase.cs
- UrlPropertyAttribute.cs
- WebHeaderCollection.cs
- StringAnimationUsingKeyFrames.cs
- OdbcFactory.cs
- SystemMulticastIPAddressInformation.cs
- RequiredFieldValidator.cs
- UIHelper.cs
- DocComment.cs
- FloaterParagraph.cs
- FigureHelper.cs
- DeploymentSectionCache.cs
- HtmlElementCollection.cs
- ExtenderControl.cs
- ViewPort3D.cs
- ViewSimplifier.cs
- CodeThrowExceptionStatement.cs
- ProcessHostServerConfig.cs
- MethodCallConverter.cs
- UpdatePanelTrigger.cs
- OpenFileDialog.cs
- SafeCoTaskMem.cs
- SortExpressionBuilder.cs
- DocumentPropertiesDialog.cs