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
- GeneralTransform2DTo3D.cs
- Deserializer.cs
- SafeBitVector32.cs
- XmlReflectionImporter.cs
- RichListBox.cs
- ForwardPositionQuery.cs
- CheckBoxStandardAdapter.cs
- SizeFConverter.cs
- RuleRef.cs
- HitTestParameters.cs
- FunctionCommandText.cs
- UidManager.cs
- FieldNameLookup.cs
- Util.cs
- RootNamespaceAttribute.cs
- BitmapMetadataEnumerator.cs
- ComplexObject.cs
- TemplatePropertyEntry.cs
- ScrollChrome.cs
- MissingMethodException.cs
- WindowsTokenRoleProvider.cs
- ImageSource.cs
- EntitySqlQueryCacheEntry.cs
- RedirectionProxy.cs
- HttpApplicationStateWrapper.cs
- DataGridViewDataConnection.cs
- ActionFrame.cs
- ToolboxCategoryItems.cs
- MergePropertyDescriptor.cs
- DBSchemaRow.cs
- EnvironmentPermission.cs
- MouseGestureValueSerializer.cs
- ExtensionDataReader.cs
- HotSpotCollectionEditor.cs
- AggregateNode.cs
- InkCollectionBehavior.cs
- RenamedEventArgs.cs
- CommunicationObjectFaultedException.cs
- Facet.cs
- SchemaSetCompiler.cs
- GridViewEditEventArgs.cs
- ComponentDispatcherThread.cs
- GetIndexBinder.cs
- ASCIIEncoding.cs
- _AutoWebProxyScriptEngine.cs
- StylusPointPropertyId.cs
- EastAsianLunisolarCalendar.cs
- D3DImage.cs
- WindowsSlider.cs
- Lookup.cs
- DataMisalignedException.cs
- SizeAnimation.cs
- CreateParams.cs
- ApplicationSecurityInfo.cs
- CompiledRegexRunner.cs
- Listbox.cs
- MenuItemAutomationPeer.cs
- LookupNode.cs
- MessagingDescriptionAttribute.cs
- XmlCollation.cs
- CatalogPart.cs
- SynchronizedDispatch.cs
- InstanceKeyCompleteException.cs
- MenuBase.cs
- SettingsPropertyValue.cs
- ThemeableAttribute.cs
- HiddenField.cs
- X509Extension.cs
- TextStore.cs
- followingsibling.cs
- AsymmetricKeyExchangeFormatter.cs
- StackSpiller.Bindings.cs
- FamilyCollection.cs
- HMAC.cs
- LogStore.cs
- EntityDataSourceChangingEventArgs.cs
- EntityModelSchemaGenerator.cs
- ComponentChangingEvent.cs
- ValueTypeFixupInfo.cs
- DetailsView.cs
- EditorPartChrome.cs
- ExternalException.cs
- DataFormat.cs
- AssemblyCache.cs
- ExtractorMetadata.cs
- WebPartDeleteVerb.cs
- IDispatchConstantAttribute.cs
- UserMapPath.cs
- MenuAdapter.cs
- SqlRowUpdatedEvent.cs
- ConcurrentBag.cs
- RowToParametersTransformer.cs
- KeyEventArgs.cs
- RootBrowserWindowAutomationPeer.cs
- GroupQuery.cs
- ConfigurationManager.cs
- EncryptedType.cs
- SmtpAuthenticationManager.cs
- XmlValidatingReader.cs
- Sql8ExpressionRewriter.cs