Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- DisposableCollectionWrapper.cs
- XamlDebuggerXmlReader.cs
- SynchronousChannelMergeEnumerator.cs
- ImportContext.cs
- ExtractorMetadata.cs
- SafeThemeHandle.cs
- AttachedPropertyMethodSelector.cs
- SmtpAuthenticationManager.cs
- SchemaCollectionPreprocessor.cs
- DataGridViewRowsAddedEventArgs.cs
- StrongNameIdentityPermission.cs
- Run.cs
- QilExpression.cs
- EventListenerClientSide.cs
- DBConcurrencyException.cs
- TypeReference.cs
- ObjectContext.cs
- BStrWrapper.cs
- PopOutPanel.cs
- ReflectPropertyDescriptor.cs
- SlipBehavior.cs
- DCSafeHandle.cs
- PointUtil.cs
- BamlRecordHelper.cs
- StdValidatorsAndConverters.cs
- ClientSideQueueItem.cs
- ContactManager.cs
- SafeNativeMethodsOther.cs
- WindowsTokenRoleProvider.cs
- Mutex.cs
- Canonicalizers.cs
- SequentialWorkflowHeaderFooter.cs
- BindingExpressionUncommonField.cs
- InheritablePropertyChangeInfo.cs
- RegexMatch.cs
- ResetableIterator.cs
- SchemaImporterExtensionElement.cs
- PartialArray.cs
- SqlMethodCallConverter.cs
- XPathArrayIterator.cs
- SaveFileDialog.cs
- QilSortKey.cs
- FixedSOMTable.cs
- Soap12ProtocolImporter.cs
- RequestCache.cs
- Library.cs
- FigureHelper.cs
- DelegatedStream.cs
- FlowNode.cs
- LoadGrammarCompletedEventArgs.cs
- ServiceNotStartedException.cs
- WebFaultException.cs
- LocalValueEnumerator.cs
- ActivityTrace.cs
- FocusChangedEventArgs.cs
- XmlIncludeAttribute.cs
- RelationshipFixer.cs
- XmlUtil.cs
- ACE.cs
- SqlConnectionPoolGroupProviderInfo.cs
- QueryOpeningEnumerator.cs
- FtpRequestCacheValidator.cs
- BindingMemberInfo.cs
- DataServiceQueryContinuation.cs
- _StreamFramer.cs
- MimeMapping.cs
- SqlCacheDependencyDatabaseCollection.cs
- RequestDescription.cs
- DSACryptoServiceProvider.cs
- VScrollProperties.cs
- FamilyMap.cs
- WmlControlAdapter.cs
- DoubleCollectionConverter.cs
- LocatorPartList.cs
- CodeTypeReference.cs
- NonPrimarySelectionGlyph.cs
- COM2ExtendedUITypeEditor.cs
- Helpers.cs
- XappLauncher.cs
- UrlPath.cs
- Matrix.cs
- KeyFrames.cs
- SmtpMail.cs
- BindingListCollectionView.cs
- NotifyInputEventArgs.cs
- Menu.cs
- ContractAdapter.cs
- QilTargetType.cs
- Flowchart.cs
- ScaleTransform.cs
- PersonalizationStateQuery.cs
- TargetException.cs
- datacache.cs
- UpWmlPageAdapter.cs
- XmlSubtreeReader.cs
- TimeSpanOrInfiniteConverter.cs
- DataGridViewEditingControlShowingEventArgs.cs
- AffineTransform3D.cs
- ColumnTypeConverter.cs
- TransformationRules.cs