Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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. // Copyright (c) Microsoft Corporation. All rights reserved./// 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
- CodeTypeDeclarationCollection.cs
- ProfileSection.cs
- isolationinterop.cs
- ObjectDataSourceView.cs
- SqlNodeTypeOperators.cs
- ObjectDataSourceSelectingEventArgs.cs
- SmiMetaData.cs
- CqlIdentifiers.cs
- StyleCollection.cs
- OutputCacheSection.cs
- TableRowsCollectionEditor.cs
- TriggerBase.cs
- ReferentialConstraint.cs
- SignedXml.cs
- ClaimComparer.cs
- ButtonPopupAdapter.cs
- Thread.cs
- EdmTypeAttribute.cs
- _NTAuthentication.cs
- MLangCodePageEncoding.cs
- EventData.cs
- baseaxisquery.cs
- ConfigurationLockCollection.cs
- QueryConverter.cs
- Process.cs
- ParenthesizePropertyNameAttribute.cs
- CodeSubDirectory.cs
- WebContext.cs
- Font.cs
- ListSurrogate.cs
- TrackingServices.cs
- NotificationContext.cs
- EventMap.cs
- SessionEndedEventArgs.cs
- HitTestParameters3D.cs
- IgnoreDeviceFilterElementCollection.cs
- WebZone.cs
- GroupPartitionExpr.cs
- ProgressBar.cs
- RuntimeHelpers.cs
- COM2FontConverter.cs
- MetadataWorkspace.cs
- PageClientProxyGenerator.cs
- TextServicesCompartmentContext.cs
- Rijndael.cs
- BufferedWebEventProvider.cs
- DocumentProperties.cs
- HttpListenerPrefixCollection.cs
- DayRenderEvent.cs
- SystemUnicastIPAddressInformation.cs
- XmlReader.cs
- Select.cs
- SynchronizedChannelCollection.cs
- BroadcastEventHelper.cs
- embossbitmapeffect.cs
- MeshGeometry3D.cs
- Win32SafeHandles.cs
- TextMetrics.cs
- RegionData.cs
- MembershipSection.cs
- FilterQuery.cs
- SQLDecimal.cs
- BookmarkOptionsHelper.cs
- PeerToPeerException.cs
- EventRouteFactory.cs
- DataGridViewDataConnection.cs
- PlainXmlWriter.cs
- Convert.cs
- NavigationProperty.cs
- VersionedStream.cs
- ZipIOExtraFieldPaddingElement.cs
- MeasureItemEvent.cs
- QilDataSource.cs
- XmlSchemaAttribute.cs
- ToolStripContentPanel.cs
- SQLInt64Storage.cs
- TransformerConfigurationWizardBase.cs
- SerializerWriterEventHandlers.cs
- OrderedDictionary.cs
- EventListenerClientSide.cs
- WindowInteractionStateTracker.cs
- SHA256Managed.cs
- MaskedTextProvider.cs
- HwndSource.cs
- BooleanSwitch.cs
- Stylesheet.cs
- BufferedReadStream.cs
- _CommandStream.cs
- Rect.cs
- FileDialogPermission.cs
- Quaternion.cs
- EdmValidator.cs
- PointConverter.cs
- FixedTextBuilder.cs
- ArgumentNullException.cs
- Win32.cs
- BindingMAnagerBase.cs
- CategoriesDocumentFormatter.cs
- ToggleButtonAutomationPeer.cs
- EntitySetBase.cs