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
- RadioButton.cs
- ThemeInfoAttribute.cs
- CategoryAttribute.cs
- SchemaComplexType.cs
- IndentTextWriter.cs
- SpeakInfo.cs
- HandleCollector.cs
- SoapInteropTypes.cs
- ThreadStaticAttribute.cs
- MexServiceChannelBuilder.cs
- LiteralTextContainerControlBuilder.cs
- SafeCoTaskMem.cs
- ThreadInterruptedException.cs
- XMLUtil.cs
- ColumnMapTranslator.cs
- ServiceParser.cs
- Sql8ConformanceChecker.cs
- SolidColorBrush.cs
- EdmComplexPropertyAttribute.cs
- TextRunProperties.cs
- SHA1CryptoServiceProvider.cs
- SqlMethodCallConverter.cs
- Font.cs
- DataExpression.cs
- counter.cs
- SqlResolver.cs
- ConfigXmlAttribute.cs
- WinFormsSecurity.cs
- EnumValidator.cs
- ModifiableIteratorCollection.cs
- ResourceLoader.cs
- CodeGenerator.cs
- ByteAnimationUsingKeyFrames.cs
- MsmqUri.cs
- XmlChildNodes.cs
- StyleCollectionEditor.cs
- DataGridViewTopLeftHeaderCell.cs
- DependencyObjectValidator.cs
- TlsSspiNegotiation.cs
- DiscoveryDocumentSerializer.cs
- FontConverter.cs
- ConfigDefinitionUpdates.cs
- ContextProperty.cs
- MemoryFailPoint.cs
- HtmlEncodedRawTextWriter.cs
- VariableBinder.cs
- SiteMapNodeItem.cs
- Transactions.cs
- StdValidatorsAndConverters.cs
- KnownBoxes.cs
- SecurityTokenValidationException.cs
- infer.cs
- SspiWrapper.cs
- SafeFileMapViewHandle.cs
- XmlSerializerFactory.cs
- Knowncolors.cs
- DataGridViewRowHeaderCell.cs
- TreeViewItemAutomationPeer.cs
- UnsafeNativeMethods.cs
- TextViewBase.cs
- FixedHyperLink.cs
- UnsafeNativeMethodsMilCoreApi.cs
- CellLabel.cs
- DocumentSequenceHighlightLayer.cs
- ValidatingPropertiesEventArgs.cs
- SchemaImporterExtensionElementCollection.cs
- BookmarkScopeHandle.cs
- VerticalAlignConverter.cs
- DataKeyArray.cs
- TypeDependencyAttribute.cs
- AppSettingsReader.cs
- PropertyValidationContext.cs
- MimeMapping.cs
- AppSettings.cs
- SmiRecordBuffer.cs
- EndEvent.cs
- SafeNativeMethods.cs
- ReservationNotFoundException.cs
- querybuilder.cs
- DecimalSumAggregationOperator.cs
- PageContent.cs
- KeyValueInternalCollection.cs
- WebControl.cs
- CatalogZoneBase.cs
- TextWriterEngine.cs
- GridViewAutomationPeer.cs
- WebHostUnsafeNativeMethods.cs
- MetadataCache.cs
- LogEntryDeserializer.cs
- OleDbParameterCollection.cs
- EncryptedPackageFilter.cs
- MSHTMLHost.cs
- HttpProtocolImporter.cs
- PinnedBufferMemoryStream.cs
- BamlReader.cs
- Ticks.cs
- ThemeDirectoryCompiler.cs
- ContentPlaceHolder.cs
- InputLangChangeRequestEvent.cs
- CommandField.cs