Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Rfc2898DeriveBytes.cs
- ellipse.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- ConfigXmlWhitespace.cs
- StoryFragments.cs
- HttpCapabilitiesEvaluator.cs
- NotImplementedException.cs
- DataConnectionHelper.cs
- FrameworkContextData.cs
- Configuration.cs
- System.Data.OracleClient_BID.cs
- TaiwanCalendar.cs
- TokenBasedSetEnumerator.cs
- VectorConverter.cs
- VBCodeProvider.cs
- TouchDevice.cs
- WebPartCatalogAddVerb.cs
- TdsParserSafeHandles.cs
- LongTypeConverter.cs
- WorkflowRuntimeSection.cs
- AmbiguousMatchException.cs
- X509UI.cs
- KeyValuePair.cs
- ButtonFieldBase.cs
- CommandCollectionEditor.cs
- TypedTableBaseExtensions.cs
- X509CertificateChain.cs
- JsonQNameDataContract.cs
- BuildProvider.cs
- DateRangeEvent.cs
- FacetValueContainer.cs
- OdbcParameter.cs
- RowBinding.cs
- ToolStripCollectionEditor.cs
- EventSource.cs
- DoWorkEventArgs.cs
- DataRelationPropertyDescriptor.cs
- SolidColorBrush.cs
- InternalCache.cs
- OdbcParameterCollection.cs
- Profiler.cs
- ListenerElementsCollection.cs
- HandlerFactoryWrapper.cs
- LocalBuilder.cs
- SwitchElementsCollection.cs
- TextRange.cs
- ZipIOCentralDirectoryBlock.cs
- DataGridViewCellMouseEventArgs.cs
- Symbol.cs
- BaseContextMenu.cs
- ProtocolsSection.cs
- SafeRightsManagementHandle.cs
- SchemaNamespaceManager.cs
- Activity.cs
- AuthenticationModeHelper.cs
- EditorPart.cs
- FilterableAttribute.cs
- ListViewDesigner.cs
- StringReader.cs
- XmlUrlResolver.cs
- Switch.cs
- NamedPipeChannelListener.cs
- ImageListStreamer.cs
- ApplicationServiceHelper.cs
- FileStream.cs
- TrackBarRenderer.cs
- ComponentEditorForm.cs
- ToolboxDataAttribute.cs
- OleDbMetaDataFactory.cs
- FilterEventArgs.cs
- OdbcParameterCollection.cs
- SyncOperationState.cs
- DataContractSerializerServiceBehavior.cs
- TripleDES.cs
- QilBinary.cs
- RenderDataDrawingContext.cs
- XmlElement.cs
- PersonalizableTypeEntry.cs
- ClientRolePrincipal.cs
- DrawingImage.cs
- DirectoryInfo.cs
- Compiler.cs
- WebConfigurationHostFileChange.cs
- XPathPatternBuilder.cs
- TextTreeText.cs
- VoiceChangeEventArgs.cs
- OleDbStruct.cs
- FontUnitConverter.cs
- ReadOnlyAttribute.cs
- KoreanCalendar.cs
- SqlEnums.cs
- SafeMILHandle.cs
- BinaryFormatter.cs
- SmiXetterAccessMap.cs
- SymbolMethod.cs
- BufferModesCollection.cs
- BaseConfigurationRecord.cs
- TextEditorLists.cs
- XmlCDATASection.cs
- RadioButtonList.cs