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
- MultiPropertyDescriptorGridEntry.cs
- VectorCollectionConverter.cs
- StylusCollection.cs
- FixedPage.cs
- UpdatePanelTrigger.cs
- UIElement3D.cs
- SizeF.cs
- XpsSerializerWriter.cs
- BoolExpression.cs
- ClientTargetCollection.cs
- RuntimeWrappedException.cs
- PropertyGeneratedEventArgs.cs
- GeometryModel3D.cs
- XmlSchemaComplexContentExtension.cs
- ListBindableAttribute.cs
- DrawItemEvent.cs
- DockPattern.cs
- InputMethod.cs
- _CommandStream.cs
- ZoneLinkButton.cs
- BindableTemplateBuilder.cs
- OuterGlowBitmapEffect.cs
- KeyPullup.cs
- SchemaNames.cs
- RadioButton.cs
- PackWebRequest.cs
- AtomParser.cs
- ProfilePropertySettingsCollection.cs
- RectAnimationClockResource.cs
- HScrollBar.cs
- CompilerState.cs
- LayoutManager.cs
- KeyValuePairs.cs
- ReflectTypeDescriptionProvider.cs
- WebBrowserHelper.cs
- VersionPair.cs
- WindowsButton.cs
- PaintEvent.cs
- ReadOnlyHierarchicalDataSource.cs
- DesignerActionList.cs
- SqlConnectionHelper.cs
- GridErrorDlg.cs
- Compiler.cs
- Exceptions.cs
- DataViewManager.cs
- DataObject.cs
- AccessDataSource.cs
- mediaclock.cs
- InkCanvasFeedbackAdorner.cs
- ZoneIdentityPermission.cs
- SharedPerformanceCounter.cs
- DataGridSortCommandEventArgs.cs
- DataSourceNameHandler.cs
- ContentPropertyAttribute.cs
- Parameter.cs
- NewExpression.cs
- ListArgumentProvider.cs
- FixedSOMImage.cs
- CancelEventArgs.cs
- ToolStripPanelCell.cs
- NullableLongAverageAggregationOperator.cs
- PropertyStore.cs
- ExpressionPrefixAttribute.cs
- ExpressionBindingsDialog.cs
- ByeOperationCD1AsyncResult.cs
- ActiveXHost.cs
- ThousandthOfEmRealPoints.cs
- BooleanAnimationUsingKeyFrames.cs
- RequestTimeoutManager.cs
- CalendarData.cs
- ObjRef.cs
- CannotUnloadAppDomainException.cs
- Padding.cs
- Size3DConverter.cs
- TextTreeRootNode.cs
- SelectionRange.cs
- XmlQueryStaticData.cs
- NavigationService.cs
- InternalEnumValidatorAttribute.cs
- Privilege.cs
- BindingOperations.cs
- ToolStripTextBox.cs
- IndexedSelectQueryOperator.cs
- ProcessDesigner.cs
- InternalBufferOverflowException.cs
- SqlClientPermission.cs
- TargetParameterCountException.cs
- Constants.cs
- Profiler.cs
- SystemUdpStatistics.cs
- ClientTarget.cs
- PtsHelper.cs
- Base64Encoder.cs
- TypeConverterHelper.cs
- HttpDebugHandler.cs
- DataContractFormatAttribute.cs
- PhoneCallDesigner.cs
- InstanceCreationEditor.cs
- CompareValidator.cs
- PointConverter.cs