Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- FlowPosition.cs
- LoginView.cs
- PrintControllerWithStatusDialog.cs
- WorkflowFormatterBehavior.cs
- WmlCommandAdapter.cs
- LinqDataSourceView.cs
- CommandID.cs
- WinFormsSpinner.cs
- XmlSignificantWhitespace.cs
- PersistenceTypeAttribute.cs
- MemberProjectedSlot.cs
- TextWriterEngine.cs
- GlyphElement.cs
- Panel.cs
- ComponentCommands.cs
- CodeMemberMethod.cs
- DataGridTextBoxColumn.cs
- RecognizerInfo.cs
- TimeSpanValidatorAttribute.cs
- SelfIssuedAuthRSACryptoProvider.cs
- BypassElement.cs
- RunClient.cs
- WorkflowValidationFailedException.cs
- TextRangeBase.cs
- ToolStripItemEventArgs.cs
- OleDbTransaction.cs
- indexingfiltermarshaler.cs
- GACIdentityPermission.cs
- XmlDomTextWriter.cs
- ResizeGrip.cs
- IdnElement.cs
- TabControl.cs
- Vector3DCollectionConverter.cs
- ExtensibleClassFactory.cs
- FormClosedEvent.cs
- StyleXamlParser.cs
- DispatcherExceptionFilterEventArgs.cs
- WindowsFormsLinkLabel.cs
- CAGDesigner.cs
- AuthenticationService.cs
- Splitter.cs
- SchemaHelper.cs
- HwndTarget.cs
- FlowLayoutPanel.cs
- TTSVoice.cs
- SrgsRule.cs
- CapabilitiesUse.cs
- NullableDecimalMinMaxAggregationOperator.cs
- ParentUndoUnit.cs
- Visual3D.cs
- UnmanagedMemoryStream.cs
- ThicknessAnimationBase.cs
- ServiceInfo.cs
- DataGridColumnHeader.cs
- XmlElementList.cs
- CodeEventReferenceExpression.cs
- StsCommunicationException.cs
- MembershipValidatePasswordEventArgs.cs
- AspNetSynchronizationContext.cs
- IisTraceListener.cs
- DataMisalignedException.cs
- HttpModulesSection.cs
- InputLanguageManager.cs
- GenericIdentity.cs
- Repeater.cs
- ToolStripOverflow.cs
- TraceSection.cs
- SourceExpressionException.cs
- EditorAttribute.cs
- WorkerRequest.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- PointLight.cs
- GreenMethods.cs
- CancellationToken.cs
- ProjectionAnalyzer.cs
- ActiveXContainer.cs
- PeerCustomResolverBindingElement.cs
- ForeignConstraint.cs
- COAUTHINFO.cs
- MissingSatelliteAssemblyException.cs
- HtmlToClrEventProxy.cs
- PropertyGeneratedEventArgs.cs
- PropertyValueUIItem.cs
- CompilationUtil.cs
- TextFragmentEngine.cs
- IndexerNameAttribute.cs
- ObjectAnimationUsingKeyFrames.cs
- ListDataBindEventArgs.cs
- HostUtils.cs
- ProcessInfo.cs
- MergePropertyDescriptor.cs
- EntryIndex.cs
- ReflectPropertyDescriptor.cs
- IPCCacheManager.cs
- TcpAppDomainProtocolHandler.cs
- ResourcePart.cs
- ThrowHelper.cs
- CompModSwitches.cs
- DES.cs
- StateItem.cs