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
- SecureEnvironment.cs
- WrappingXamlSchemaContext.cs
- DefaultTextStoreTextComposition.cs
- AnnotationObservableCollection.cs
- FrameworkTextComposition.cs
- PeerObject.cs
- ControlEvent.cs
- SplitContainer.cs
- ValidationError.cs
- TransformProviderWrapper.cs
- SQLDoubleStorage.cs
- MessageBox.cs
- TransactionManager.cs
- Table.cs
- Focus.cs
- ContextMenu.cs
- ContextQuery.cs
- BitmapSourceSafeMILHandle.cs
- XmlSchemaChoice.cs
- Crc32.cs
- HScrollProperties.cs
- ErrorsHelper.cs
- InternalCache.cs
- SoapEnumAttribute.cs
- SystemIPGlobalProperties.cs
- Rotation3DAnimationUsingKeyFrames.cs
- TextBreakpoint.cs
- assertwrapper.cs
- BorderSidesEditor.cs
- UnlockInstanceAsyncResult.cs
- JsonGlobals.cs
- PackageFilter.cs
- XPathNode.cs
- EventLogTraceListener.cs
- _NegoState.cs
- SpellCheck.cs
- DataSvcMapFileSerializer.cs
- ArraySubsetEnumerator.cs
- FlowSwitchLink.cs
- EnumValidator.cs
- GenericRootAutomationPeer.cs
- Parameter.cs
- AnnotationComponentManager.cs
- DbDeleteCommandTree.cs
- HttpFileCollection.cs
- HitTestDrawingContextWalker.cs
- SQLCharsStorage.cs
- AutomationAttributeInfo.cs
- SplashScreen.cs
- ImageDrawing.cs
- StreamingContext.cs
- Crc32.cs
- StatusBar.cs
- Storyboard.cs
- _HeaderInfo.cs
- ActivityInstance.cs
- DataGridViewComboBoxEditingControl.cs
- ViewService.cs
- SeverityFilter.cs
- XamlGridLengthSerializer.cs
- SqlRewriteScalarSubqueries.cs
- QuaternionValueSerializer.cs
- SaveFileDialog.cs
- SparseMemoryStream.cs
- EventItfInfo.cs
- NativeMethods.cs
- ScriptControl.cs
- PermissionAttributes.cs
- HyperLinkDataBindingHandler.cs
- GraphicsPathIterator.cs
- TdsParserSafeHandles.cs
- TrackingProfileCache.cs
- Ipv6Element.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- CompareInfo.cs
- RolePrincipal.cs
- _ConnectionGroup.cs
- Compiler.cs
- CheckBoxPopupAdapter.cs
- TypeExtensionSerializer.cs
- ColorBlend.cs
- MenuEventArgs.cs
- ToolStripPanelSelectionBehavior.cs
- TypeInfo.cs
- RequestContext.cs
- SHA1CryptoServiceProvider.cs
- Vector3DValueSerializer.cs
- CommandSet.cs
- OleDbException.cs
- AppLevelCompilationSectionCache.cs
- BindingMAnagerBase.cs
- TextTreeDeleteContentUndoUnit.cs
- Screen.cs
- PopOutPanel.cs
- MailAddressCollection.cs
- ActivityExecutor.cs
- ToolstripProfessionalRenderer.cs
- SystemResourceHost.cs
- DoubleSumAggregationOperator.cs
- HttpListenerPrefixCollection.cs