Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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. //------------------------------------------------------------------------------ ///// Gets the row number and column number of the cell. /// ///// 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
- SelectorAutomationPeer.cs
- MenuItem.cs
- CanonicalizationDriver.cs
- ErrorActivity.cs
- KnownColorTable.cs
- WebServiceResponse.cs
- Decorator.cs
- SHA1CryptoServiceProvider.cs
- TimeSpanMinutesConverter.cs
- XmlNamespaceDeclarationsAttribute.cs
- ToolStripSeparator.cs
- CustomAttributeFormatException.cs
- SQLChars.cs
- SqlCharStream.cs
- ConfigurationValues.cs
- NetPipeSection.cs
- PropertyGridCommands.cs
- MessageQueuePermissionEntry.cs
- TextElementEnumerator.cs
- GenericPrincipal.cs
- MessageDesigner.cs
- XPathNodeIterator.cs
- BamlResourceSerializer.cs
- MaskedTextProvider.cs
- ToolStripItem.cs
- SurrogateEncoder.cs
- TdsParserSessionPool.cs
- Decimal.cs
- StyleCollection.cs
- SQLDecimalStorage.cs
- BasicViewGenerator.cs
- PackageDigitalSignature.cs
- StrokeSerializer.cs
- ExpressionNode.cs
- GridViewCommandEventArgs.cs
- PageSettings.cs
- TextEditorCharacters.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- TextParentUndoUnit.cs
- PersonalizationStateInfoCollection.cs
- cryptoapiTransform.cs
- AutomationPatternInfo.cs
- DataGridViewCellValidatingEventArgs.cs
- TextBox.cs
- SystemIPInterfaceProperties.cs
- CodePrimitiveExpression.cs
- EnvironmentPermission.cs
- SubMenuStyle.cs
- ToolStripDropDown.cs
- ApplicationBuildProvider.cs
- StyleXamlParser.cs
- ActivityTypeDesigner.xaml.cs
- AnimationClock.cs
- GacUtil.cs
- TypedDataSourceCodeGenerator.cs
- ToolStripSplitStackLayout.cs
- DnsPermission.cs
- DiscoveryRequestHandler.cs
- SQLDateTime.cs
- GlobalItem.cs
- DataServiceRequestOfT.cs
- XsdDuration.cs
- _ConnectOverlappedAsyncResult.cs
- ResXResourceReader.cs
- HttpContextServiceHost.cs
- PreviewControlDesigner.cs
- InstancePersistenceException.cs
- WebReferencesBuildProvider.cs
- CodeIdentifier.cs
- ListCardsInFileRequest.cs
- PageStatePersister.cs
- RadioButtonRenderer.cs
- EntityDataSourceValidationException.cs
- StringBuilder.cs
- SerialPort.cs
- SqlRetyper.cs
- StrokeNodeData.cs
- ApplySecurityAndSendAsyncResult.cs
- SqlConnectionString.cs
- PageFunction.cs
- TextBoxView.cs
- Encoder.cs
- SimpleNameService.cs
- TreeView.cs
- SamlAuthenticationClaimResource.cs
- LineSegment.cs
- GroupQuery.cs
- WebPartMinimizeVerb.cs
- MouseDevice.cs
- SecurityState.cs
- ObjectSet.cs
- XamlPointCollectionSerializer.cs
- DictionaryTraceRecord.cs
- BadImageFormatException.cs
- AuthorizationSection.cs
- ListenerSessionConnection.cs
- LinqDataView.cs
- CollectionViewGroupInternal.cs
- FieldAccessException.cs
- EdmValidator.cs