Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- PDBReader.cs
- IndentedWriter.cs
- _AutoWebProxyScriptWrapper.cs
- TextViewBase.cs
- DeobfuscatingStream.cs
- sqlstateclientmanager.cs
- DataChangedEventManager.cs
- DocumentOrderQuery.cs
- FloaterBaseParagraph.cs
- Preprocessor.cs
- CustomAttributeSerializer.cs
- Repeater.cs
- Timer.cs
- DataSourceExpressionCollection.cs
- WebPartConnectVerb.cs
- DataRelationPropertyDescriptor.cs
- VirtualPathUtility.cs
- InputProviderSite.cs
- RoleGroup.cs
- ToolStripItemEventArgs.cs
- NumberFormatter.cs
- CodeAccessSecurityEngine.cs
- EmptyCollection.cs
- FaultContractAttribute.cs
- IndexerNameAttribute.cs
- PeerHelpers.cs
- Geometry.cs
- TokenCreationParameter.cs
- ProviderConnectionPoint.cs
- _AutoWebProxyScriptHelper.cs
- XmlSchemaElement.cs
- RenderingEventArgs.cs
- SessionPageStateSection.cs
- PageTheme.cs
- XmlSchemaException.cs
- PrePrepareMethodAttribute.cs
- StandardOleMarshalObject.cs
- Validator.cs
- PackagingUtilities.cs
- FileLoadException.cs
- ImplicitInputBrush.cs
- XPathSelfQuery.cs
- ChtmlTextWriter.cs
- OrderByBuilder.cs
- SignedInfo.cs
- Label.cs
- DispatcherHookEventArgs.cs
- Variant.cs
- TreeView.cs
- HttpProfileGroupBase.cs
- InputScopeAttribute.cs
- Grid.cs
- TimeSpanMinutesConverter.cs
- CompilationUtil.cs
- ServiceSettingsResponseInfo.cs
- StickyNoteContentControl.cs
- Encoder.cs
- MemberHolder.cs
- DrawItemEvent.cs
- DataTableExtensions.cs
- AppDomainProtocolHandler.cs
- Helper.cs
- BinaryParser.cs
- SafeNativeMethods.cs
- IncrementalHitTester.cs
- HierarchicalDataBoundControl.cs
- CodeGenerator.cs
- ComponentEvent.cs
- HttpHandlersSection.cs
- GridToolTip.cs
- StorageConditionPropertyMapping.cs
- DBDataPermission.cs
- RichTextBox.cs
- ChangeDirector.cs
- ContourSegment.cs
- TextRangeBase.cs
- Soap11ServerProtocol.cs
- ListViewSortEventArgs.cs
- DataReaderContainer.cs
- ImmComposition.cs
- LocalizationComments.cs
- IriParsingElement.cs
- ScriptControl.cs
- HtmlShimManager.cs
- DynamicILGenerator.cs
- WindowsTitleBar.cs
- CodeExpressionStatement.cs
- ButtonBase.cs
- SystemIPGlobalProperties.cs
- SiteMapNode.cs
- ListParagraph.cs
- MetadataArtifactLoader.cs
- ResourceCodeDomSerializer.cs
- HostedAspNetEnvironment.cs
- SinglePhaseEnlistment.cs
- TileBrush.cs
- DiscoveryMessageSequence11.cs
- InheritanceContextHelper.cs
- PingReply.cs
- StartUpEventArgs.cs