Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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. // Copyright (c) Microsoft Corporation. All rights reserved./// 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
- XmlSchemaAny.cs
- ObjectHelper.cs
- XamlVector3DCollectionSerializer.cs
- UncommonField.cs
- GenericArgumentsUpdater.cs
- SHA512CryptoServiceProvider.cs
- CorrelationManager.cs
- URIFormatException.cs
- ProfileEventArgs.cs
- DependencyObjectProvider.cs
- CssClassPropertyAttribute.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- ChannelOptions.cs
- GridPattern.cs
- PrintControllerWithStatusDialog.cs
- AssertUtility.cs
- WorkerRequest.cs
- WindowsNonControl.cs
- SpStreamWrapper.cs
- MetadataArtifactLoaderCompositeResource.cs
- CapabilitiesState.cs
- ToolStripScrollButton.cs
- ModuleBuilderData.cs
- XmlSchemaChoice.cs
- SelectionEditor.cs
- ClientBuildManager.cs
- PackWebRequestFactory.cs
- DrawingContextWalker.cs
- ExtendedProperty.cs
- DropShadowBitmapEffect.cs
- SafeBitVector32.cs
- ComponentChangedEvent.cs
- TableRowCollection.cs
- HtmlInputControl.cs
- FixedElement.cs
- DetailsViewCommandEventArgs.cs
- UIElementParaClient.cs
- CachingHintValidation.cs
- PerformanceCounterPermission.cs
- CodeThrowExceptionStatement.cs
- GenericTextProperties.cs
- SecureUICommand.cs
- UInt16.cs
- Stylus.cs
- ConstrainedGroup.cs
- XmlCharCheckingReader.cs
- BitVector32.cs
- HuffmanTree.cs
- ToolStripContentPanelRenderEventArgs.cs
- Wildcard.cs
- _ConnectOverlappedAsyncResult.cs
- DebugInfoGenerator.cs
- SurrogateDataContract.cs
- WebPartCatalogCloseVerb.cs
- ExtenderProvidedPropertyAttribute.cs
- VirtualStackFrame.cs
- FontFamily.cs
- NotifyParentPropertyAttribute.cs
- XmlNavigatorStack.cs
- ObjectToIdCache.cs
- SettingsPropertyValueCollection.cs
- StringConverter.cs
- FontCollection.cs
- SqlMetaData.cs
- ContainerUtilities.cs
- WinEventWrap.cs
- Table.cs
- Crypto.cs
- NameNode.cs
- PackagePart.cs
- SelectionRange.cs
- XMLDiffLoader.cs
- PermissionListSet.cs
- ButtonBaseAdapter.cs
- SecurityUtils.cs
- ListBoxItem.cs
- ObjectDataSourceStatusEventArgs.cs
- PageContentAsyncResult.cs
- InvokePatternIdentifiers.cs
- _CacheStreams.cs
- KeyedCollection.cs
- ObjectSet.cs
- FormsAuthenticationUser.cs
- LZCodec.cs
- CapabilitiesAssignment.cs
- PerformanceCounter.cs
- PointCollection.cs
- WebPartConnectionsEventArgs.cs
- Conditional.cs
- CompilerCollection.cs
- CombinedGeometry.cs
- SerialPort.cs
- ScriptResourceHandler.cs
- __ComObject.cs
- ForeignConstraint.cs
- SafeCryptoHandles.cs
- SourceSwitch.cs
- ExpressionConverter.cs
- IncrementalCompileAnalyzer.cs
- InstanceDataCollectionCollection.cs