Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridCell.cs / 1305376 / 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. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RegisteredDisposeScript.cs
- _ConnectOverlappedAsyncResult.cs
- ListView.cs
- _Rfc2616CacheValidators.cs
- BitmapDownload.cs
- DependencyObjectProvider.cs
- ListViewDeletedEventArgs.cs
- MergeLocalizationDirectives.cs
- MenuItemStyle.cs
- WebHeaderCollection.cs
- AccessDataSource.cs
- BatchParser.cs
- HitTestResult.cs
- ToolStrip.cs
- HierarchicalDataTemplate.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- EncryptedKey.cs
- TrustManagerPromptUI.cs
- WebControlAdapter.cs
- MetafileEditor.cs
- CreateUserWizard.cs
- ProcessProtocolHandler.cs
- ResourcesGenerator.cs
- ThreadStartException.cs
- ConnectorMovedEventArgs.cs
- ResXDataNode.cs
- MessageQueueKey.cs
- CodeExporter.cs
- NoClickablePointException.cs
- CharacterBuffer.cs
- KnownTypes.cs
- XmlConvert.cs
- LinearGradientBrush.cs
- WindowsRegion.cs
- CredentialCache.cs
- AuthenticationService.cs
- TimelineCollection.cs
- EditCommandColumn.cs
- KeyGestureValueSerializer.cs
- GC.cs
- ITextView.cs
- MimeMultiPart.cs
- LayoutTableCell.cs
- ConsoleKeyInfo.cs
- ReadOnlyNameValueCollection.cs
- AddInAdapter.cs
- FontInfo.cs
- WebBrowserContainer.cs
- PeerNameRecord.cs
- SecurityStandardsManager.cs
- ComponentEvent.cs
- JoinSymbol.cs
- UrlMappingsSection.cs
- UIElementParaClient.cs
- CfgRule.cs
- Button.cs
- ExpressionLink.cs
- DataGridViewElement.cs
- UnaryExpressionHelper.cs
- Environment.cs
- _CookieModule.cs
- EntityDescriptor.cs
- FileDataSource.cs
- SoapElementAttribute.cs
- TableLayout.cs
- ChameleonKey.cs
- ConstructorExpr.cs
- VersionPair.cs
- DescendantOverDescendantQuery.cs
- OleDbDataReader.cs
- CodeLabeledStatement.cs
- EditorBrowsableAttribute.cs
- XmlSchemaAnnotated.cs
- XamlValidatingReader.cs
- XmlCharType.cs
- InternalsVisibleToAttribute.cs
- UserControl.cs
- TextBounds.cs
- DataRowExtensions.cs
- PerformanceCounterLib.cs
- ModuleConfigurationInfo.cs
- Rule.cs
- TextEditorMouse.cs
- DateRangeEvent.cs
- SchemaImporterExtensionsSection.cs
- DiscoveryMessageSequence11.cs
- HyperLinkColumn.cs
- BinarySecretSecurityToken.cs
- ResolveCriteria.cs
- COM2ExtendedBrowsingHandler.cs
- SqlResolver.cs
- basecomparevalidator.cs
- DataGridViewCellStyleEditor.cs
- WorkflowMarkupSerializationException.cs
- FormView.cs
- InstanceKeyCompleteException.cs
- OleDbFactory.cs
- WebPartMovingEventArgs.cs
- ErrorHandler.cs
- SimpleHandlerFactory.cs