Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridCell.cs / 1305376 / 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
- ExternalFile.cs
- TemplateColumn.cs
- TypeBrowserDialog.cs
- Predicate.cs
- InstanceOwnerException.cs
- SqlAggregateChecker.cs
- TransformedBitmap.cs
- DesignerActionUIStateChangeEventArgs.cs
- DecoderNLS.cs
- HttpsHostedTransportConfiguration.cs
- BitmapEditor.cs
- PaintValueEventArgs.cs
- BamlStream.cs
- SmiConnection.cs
- MonitoringDescriptionAttribute.cs
- LinkButton.cs
- Regex.cs
- SelectorItemAutomationPeer.cs
- IntegrationExceptionEventArgs.cs
- PrinterUnitConvert.cs
- AmbiguousMatchException.cs
- GorillaCodec.cs
- OdbcConnection.cs
- XpsLiterals.cs
- CatalogPart.cs
- Table.cs
- ProviderMetadata.cs
- Line.cs
- ProcessStartInfo.cs
- CompilationRelaxations.cs
- TableLayoutSettings.cs
- UndirectedGraph.cs
- DataSpaceManager.cs
- FileRecordSequenceCompletedAsyncResult.cs
- EnterpriseServicesHelper.cs
- EventProviderBase.cs
- ListBoxItem.cs
- MachineKeyConverter.cs
- RelatedView.cs
- FlowPosition.cs
- WebBrowserSiteBase.cs
- Clock.cs
- RegisteredDisposeScript.cs
- PrimaryKeyTypeConverter.cs
- OpenFileDialog.cs
- XPathDocumentNavigator.cs
- DragEvent.cs
- BulletChrome.cs
- DBBindings.cs
- COM2ExtendedUITypeEditor.cs
- DatatypeImplementation.cs
- BackgroundFormatInfo.cs
- FileChangeNotifier.cs
- FlowPosition.cs
- EditorOptionAttribute.cs
- ContractReference.cs
- NeutralResourcesLanguageAttribute.cs
- Operand.cs
- ProxyWebPart.cs
- ColumnPropertiesGroup.cs
- DateTimeSerializationSection.cs
- ManipulationCompletedEventArgs.cs
- RequestTimeoutManager.cs
- EncryptedData.cs
- GlobalProxySelection.cs
- RewritingSimplifier.cs
- MenuBase.cs
- WebPartExportVerb.cs
- StreamedFramingRequestChannel.cs
- GeneralTransform3DGroup.cs
- SelectionPattern.cs
- CLSCompliantAttribute.cs
- ValidatingReaderNodeData.cs
- MSAAEventDispatcher.cs
- basemetadatamappingvisitor.cs
- Marshal.cs
- ObjectItemCollection.cs
- FormattedText.cs
- ISessionStateStore.cs
- Version.cs
- WriteFileContext.cs
- Roles.cs
- TypedTableBase.cs
- UserControlCodeDomTreeGenerator.cs
- SecureStringHasher.cs
- XmlCharacterData.cs
- IntegerValidator.cs
- EtwTrace.cs
- PolicyFactory.cs
- GridViewCommandEventArgs.cs
- IdleTimeoutMonitor.cs
- StdValidatorsAndConverters.cs
- VisualBasicSettingsHandler.cs
- ThrowOnMultipleAssignment.cs
- Attributes.cs
- NameTable.cs
- TileModeValidation.cs
- HandleExceptionArgs.cs
- BufferModesCollection.cs
- UrlMappingsModule.cs