Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ParameterToken.cs
- XPathNodeInfoAtom.cs
- PanelDesigner.cs
- SoundPlayer.cs
- MasterPageParser.cs
- HostVisual.cs
- ObjectViewQueryResultData.cs
- WebSysDisplayNameAttribute.cs
- StrongNameKeyPair.cs
- OLEDB_Enum.cs
- DbProviderFactories.cs
- GridViewRowCollection.cs
- SectionVisual.cs
- ZoneLinkButton.cs
- Typography.cs
- Typeface.cs
- StringValidatorAttribute.cs
- Win32.cs
- TranslateTransform.cs
- XmlConverter.cs
- BamlResourceSerializer.cs
- RuleValidation.cs
- FileSystemWatcher.cs
- SqlDataSourceQueryEditor.cs
- CustomBindingCollectionElement.cs
- ErrorCodes.cs
- SignedXml.cs
- SingleQueryOperator.cs
- __TransparentProxy.cs
- ObjectListItem.cs
- Bold.cs
- RuntimeTransactionHandle.cs
- SqlDataSourceCache.cs
- AttributeUsageAttribute.cs
- DataBinder.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- SiblingIterators.cs
- LOSFormatter.cs
- ProcessProtocolHandler.cs
- ResourcesGenerator.cs
- DbMetaDataCollectionNames.cs
- XmlSchemaAttributeGroupRef.cs
- Model3D.cs
- HtmlInputCheckBox.cs
- HtmlInputPassword.cs
- Queue.cs
- SourceElementsCollection.cs
- DbXmlEnabledProviderManifest.cs
- EventLogPermissionAttribute.cs
- Symbol.cs
- ServiceMemoryGates.cs
- UTF32Encoding.cs
- DateTime.cs
- TableStyle.cs
- XsdBuilder.cs
- DbDataReader.cs
- NetTcpSection.cs
- HyperlinkAutomationPeer.cs
- XmlDataLoader.cs
- Container.cs
- DisplayNameAttribute.cs
- BaseDataBoundControl.cs
- RouteParser.cs
- CustomTypeDescriptor.cs
- ToolTipAutomationPeer.cs
- coordinatorscratchpad.cs
- RecognizerInfo.cs
- DataGridCaption.cs
- SHA1.cs
- ActivityBuilder.cs
- WebSysDefaultValueAttribute.cs
- ChannelSettingsElement.cs
- HttpWriter.cs
- ErrorsHelper.cs
- AttributeCollection.cs
- log.cs
- DataKey.cs
- Misc.cs
- _NetRes.cs
- FloatMinMaxAggregationOperator.cs
- MdImport.cs
- IODescriptionAttribute.cs
- X500Name.cs
- FSWPathEditor.cs
- DecoderReplacementFallback.cs
- Touch.cs
- CurrentChangingEventManager.cs
- ObjectDataSourceSelectingEventArgs.cs
- TextRunCacheImp.cs
- BaseServiceProvider.cs
- MetadataArtifactLoaderComposite.cs
- LicenseContext.cs
- ProxyWebPartConnectionCollection.cs
- ByteStreamMessageEncoder.cs
- SqlResolver.cs
- UserControlDocumentDesigner.cs
- DelegatingConfigHost.cs
- ToolboxService.cs
- ConfigXmlWhitespace.cs
- EntryWrittenEventArgs.cs