Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridCell.cs / 1 / DataGridCell.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System; using System.Globalization; ////// /// [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")] public struct DataGridCell { private int rowNumber; private int columnNumber; ///Identifies a cell in the grid. ////// /// public int ColumnNumber { get { return columnNumber; } set { columnNumber = value; } } ///Gets or sets the number of a column in the ///control. /// /// public int RowNumber { get { return rowNumber; } set { rowNumber = value; } } ///Gets or sets the number of a row in the ///control. /// /// public DataGridCell(int r, int c) { this.rowNumber = r; this.columnNumber = c; } ////// Initializes a new instance of the ///class. /// /// /// [SuppressMessage("Microsoft.Usage", "CA2231:OverrideOperatorEqualsOnOverridingValueTypeEquals")] public override bool Equals(object o) { if (o is DataGridCell) { DataGridCell rhs = (DataGridCell)o; return (rhs.RowNumber == RowNumber && rhs.ColumnNumber == ColumnNumber); } else return false; } ////// Gets a value indicating whether the ///is identical to a second /// . /// /// /// public override int GetHashCode() { return ((~rowNumber * (columnNumber+1)) & 0x00ffff00) >> 8; } ////// Gets /// a hash value that uniquely identifies the cell. /// ////// /// public override string ToString() { return "DataGridCell {RowNumber = " + RowNumber.ToString(CultureInfo.CurrentCulture) + ", ColumnNumber = " + ColumnNumber.ToString(CultureInfo.CurrentCulture) + "}"; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Gets the row number and column number of the cell. /// ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System; using System.Globalization; ////// /// [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")] public struct DataGridCell { private int rowNumber; private int columnNumber; ///Identifies a cell in the grid. ////// /// public int ColumnNumber { get { return columnNumber; } set { columnNumber = value; } } ///Gets or sets the number of a column in the ///control. /// /// public int RowNumber { get { return rowNumber; } set { rowNumber = value; } } ///Gets or sets the number of a row in the ///control. /// /// public DataGridCell(int r, int c) { this.rowNumber = r; this.columnNumber = c; } ////// Initializes a new instance of the ///class. /// /// /// [SuppressMessage("Microsoft.Usage", "CA2231:OverrideOperatorEqualsOnOverridingValueTypeEquals")] public override bool Equals(object o) { if (o is DataGridCell) { DataGridCell rhs = (DataGridCell)o; return (rhs.RowNumber == RowNumber && rhs.ColumnNumber == ColumnNumber); } else return false; } ////// Gets a value indicating whether the ///is identical to a second /// . /// /// /// public override int GetHashCode() { return ((~rowNumber * (columnNumber+1)) & 0x00ffff00) >> 8; } ////// Gets /// a hash value that uniquely identifies the cell. /// ////// /// public override string ToString() { return "DataGridCell {RowNumber = " + RowNumber.ToString(CultureInfo.CurrentCulture) + ", ColumnNumber = " + ColumnNumber.ToString(CultureInfo.CurrentCulture) + "}"; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Gets the row number and column number of the cell. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OrderedHashRepartitionStream.cs
- SoapIncludeAttribute.cs
- ConstraintCollection.cs
- CssClassPropertyAttribute.cs
- ProvidePropertyAttribute.cs
- UrlAuthFailedErrorFormatter.cs
- PreloadedPackages.cs
- Msec.cs
- SeekableReadStream.cs
- TraceSection.cs
- _BasicClient.cs
- FigureHelper.cs
- IndentTextWriter.cs
- BindingExpressionUncommonField.cs
- ProfileGroupSettings.cs
- IdentitySection.cs
- LinqDataSourceHelper.cs
- SqlWriter.cs
- SoapHeaderException.cs
- ExternalDataExchangeClient.cs
- GiveFeedbackEvent.cs
- MatchAttribute.cs
- FreezableCollection.cs
- DataServiceHostWrapper.cs
- DBDataPermissionAttribute.cs
- EntityDataSourceChangingEventArgs.cs
- ReflectTypeDescriptionProvider.cs
- AutomationProperty.cs
- NameValueFileSectionHandler.cs
- InstallHelper.cs
- DispatcherExceptionEventArgs.cs
- DesigntimeLicenseContext.cs
- XPathAncestorQuery.cs
- GeneralTransformGroup.cs
- Triplet.cs
- EntityKey.cs
- XmlLanguage.cs
- Attributes.cs
- OperandQuery.cs
- HttpListenerContext.cs
- GAC.cs
- Int16AnimationUsingKeyFrames.cs
- StrokeSerializer.cs
- SystemIPInterfaceProperties.cs
- Size.cs
- SqlMethodAttribute.cs
- TextEditorMouse.cs
- EditorZoneBase.cs
- TailPinnedEventArgs.cs
- Panel.cs
- Preprocessor.cs
- EntityProxyFactory.cs
- ArrayListCollectionBase.cs
- XmlSchemaValidationException.cs
- Directory.cs
- HttpFileCollectionWrapper.cs
- InteropEnvironment.cs
- DataGridViewEditingControlShowingEventArgs.cs
- FrameworkElementFactoryMarkupObject.cs
- DataGridDesigner.cs
- FormsAuthenticationConfiguration.cs
- WebPartEditorOkVerb.cs
- IListConverters.cs
- HandleCollector.cs
- CodeArrayCreateExpression.cs
- HyperLinkField.cs
- CompilerHelpers.cs
- CommandLineParser.cs
- DragCompletedEventArgs.cs
- TemplateLookupAction.cs
- MimeReturn.cs
- Pipe.cs
- Clock.cs
- PropertyDescriptor.cs
- SqlCharStream.cs
- XmlIncludeAttribute.cs
- EventLogPermissionEntry.cs
- ToolStripPanelRenderEventArgs.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- FirstMatchCodeGroup.cs
- MetadataHelper.cs
- PropertyInformation.cs
- TargetFrameworkUtil.cs
- TemplateBamlRecordReader.cs
- BindingsCollection.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- RuntimeConfigLKG.cs
- TdsParserHelperClasses.cs
- SoapHeader.cs
- AsymmetricKeyExchangeFormatter.cs
- NamespaceMapping.cs
- SQLInt32Storage.cs
- CalendarDateRangeChangingEventArgs.cs
- HebrewNumber.cs
- DbProviderManifest.cs
- StringAnimationUsingKeyFrames.cs
- HashCoreRequest.cs
- SafeThemeHandle.cs
- TreeNodeCollection.cs
- Base64Decoder.cs