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
- SQLDateTimeStorage.cs
- TransformConverter.cs
- FixedNode.cs
- EmptyStringExpandableObjectConverter.cs
- WebScriptMetadataFormatter.cs
- WindowsEditBox.cs
- ApplicationActivator.cs
- TcpProcessProtocolHandler.cs
- EntityDataSourceWizardForm.cs
- SQlBooleanStorage.cs
- FactoryId.cs
- lengthconverter.cs
- DomainLiteralReader.cs
- SqlHelper.cs
- SelectorAutomationPeer.cs
- EditingContext.cs
- CodeGenerator.cs
- _StreamFramer.cs
- RSAPKCS1SignatureDeformatter.cs
- StreamUpdate.cs
- InheritanceAttribute.cs
- XamlStyleSerializer.cs
- XmlChildNodes.cs
- LinqDataSourceDisposeEventArgs.cs
- ComboBoxDesigner.cs
- SmtpFailedRecipientsException.cs
- FunctionNode.cs
- ImpersonateTokenRef.cs
- UpDownEvent.cs
- NetworkInformationException.cs
- WindowsEditBoxRange.cs
- SerializationInfo.cs
- COAUTHINFO.cs
- DataPagerCommandEventArgs.cs
- DoubleKeyFrameCollection.cs
- KnownBoxes.cs
- DesignerSerializationOptionsAttribute.cs
- FieldNameLookup.cs
- LinqToSqlWrapper.cs
- UTF7Encoding.cs
- CompleteWizardStep.cs
- MDIWindowDialog.cs
- SqlProviderManifest.cs
- DataGridViewLayoutData.cs
- ManipulationDevice.cs
- ReadWriteObjectLock.cs
- securitycriticaldataClass.cs
- LinkedList.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- CdpEqualityComparer.cs
- PerformanceCountersElement.cs
- NullExtension.cs
- HiddenFieldDesigner.cs
- TreeNodeBinding.cs
- CharacterBuffer.cs
- SmiEventSink_DeferedProcessing.cs
- UpdateEventArgs.cs
- Subtree.cs
- DBSqlParserColumnCollection.cs
- TypeSystem.cs
- ThousandthOfEmRealPoints.cs
- SQLBytes.cs
- GridItemCollection.cs
- SvcMapFileSerializer.cs
- coordinatorscratchpad.cs
- StringConcat.cs
- TCPListener.cs
- arabicshape.cs
- WebConfigurationHostFileChange.cs
- SafeIUnknown.cs
- SAPICategories.cs
- SqlConnectionStringBuilder.cs
- SecurityTokenResolver.cs
- Vertex.cs
- BamlRecordWriter.cs
- XmlAtomicValue.cs
- SmiRecordBuffer.cs
- Process.cs
- LingerOption.cs
- MarkedHighlightComponent.cs
- PeerObject.cs
- ObjectViewQueryResultData.cs
- SoundPlayer.cs
- TreeWalkHelper.cs
- SyndicationFeed.cs
- ImportStoreException.cs
- Point.cs
- DynamicRenderer.cs
- DbParameterCollection.cs
- FloatUtil.cs
- DataGridCaption.cs
- WindowsListViewGroup.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- DataServiceRequestArgs.cs
- SystemTcpStatistics.cs
- UInt64.cs
- ContravarianceAdapter.cs
- WrappedIUnknown.cs
- ConnectorRouter.cs
- ServiceManagerHandle.cs