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
- DictionaryMarkupSerializer.cs
- X509ScopedServiceCertificateElement.cs
- DiffuseMaterial.cs
- WebFormsRootDesigner.cs
- HttpResponseWrapper.cs
- ExcCanonicalXml.cs
- WindowsImpersonationContext.cs
- SqlFunctionAttribute.cs
- __ConsoleStream.cs
- FileUpload.cs
- RuntimeConfigurationRecord.cs
- ThreadStaticAttribute.cs
- SessionPageStatePersister.cs
- AvTrace.cs
- XpsFilter.cs
- DbConnectionStringCommon.cs
- EntityCollectionChangedParams.cs
- remotingproxy.cs
- TextBoxLine.cs
- Point3D.cs
- RulePatternOps.cs
- Permission.cs
- NameValueSectionHandler.cs
- BamlResourceContent.cs
- MultipartIdentifier.cs
- TagMapInfo.cs
- PointF.cs
- TextDecoration.cs
- EventProviderClassic.cs
- DbConnectionStringBuilder.cs
- DrawingAttributeSerializer.cs
- SmuggledIUnknown.cs
- ReflectEventDescriptor.cs
- EmptyControlCollection.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- HtmlElementErrorEventArgs.cs
- EventLogPermissionAttribute.cs
- TableCellCollection.cs
- DispatchChannelSink.cs
- WindowsGraphicsCacheManager.cs
- DataGridViewIntLinkedList.cs
- DefaultAsyncDataDispatcher.cs
- baseshape.cs
- OutputScope.cs
- DesignerSelectionListAdapter.cs
- AutomationProperties.cs
- Deserializer.cs
- Process.cs
- webeventbuffer.cs
- LiteralControl.cs
- WorkBatch.cs
- ImportRequest.cs
- ReadOnlyCollectionBuilder.cs
- MetaData.cs
- MetafileHeader.cs
- Constraint.cs
- InputScopeNameConverter.cs
- TransformedBitmap.cs
- DBBindings.cs
- FileLoadException.cs
- ZoneButton.cs
- PerformanceCounters.cs
- ApplicationTrust.cs
- Matrix3DConverter.cs
- DeviceContexts.cs
- FontCollection.cs
- SizeKeyFrameCollection.cs
- PositiveTimeSpanValidator.cs
- MatchingStyle.cs
- TableChangeProcessor.cs
- BitmapImage.cs
- entitydatasourceentitysetnameconverter.cs
- RegexBoyerMoore.cs
- EmptyElement.cs
- Automation.cs
- LocalizableResourceBuilder.cs
- XmlMembersMapping.cs
- Variable.cs
- FileUtil.cs
- DuplicateWaitObjectException.cs
- CompilerTypeWithParams.cs
- ProxyGenerator.cs
- PointAnimationClockResource.cs
- SimplePropertyEntry.cs
- EventLogger.cs
- ObjectSet.cs
- PopOutPanel.cs
- AppSettingsExpressionBuilder.cs
- DataObjectPastingEventArgs.cs
- _UriSyntax.cs
- ByteStorage.cs
- UnsafePeerToPeerMethods.cs
- ErrorHandlerModule.cs
- HeaderCollection.cs
- ConnectionPoolManager.cs
- ManualResetEvent.cs
- SiteMapProvider.cs
- WorkflowWebService.cs
- MemberJoinTreeNode.cs
- FormatVersion.cs