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
- ExclusiveTcpListener.cs
- TextPointerBase.cs
- Int32Collection.cs
- FrugalMap.cs
- StylusEditingBehavior.cs
- LinkLabelLinkClickedEvent.cs
- AlternateViewCollection.cs
- TextServicesCompartmentContext.cs
- NeutralResourcesLanguageAttribute.cs
- QueryLifecycle.cs
- DecimalStorage.cs
- RootProfilePropertySettingsCollection.cs
- FixedSOMTextRun.cs
- AuthenticationConfig.cs
- CodeSnippetStatement.cs
- FormsAuthenticationUserCollection.cs
- BookmarkInfo.cs
- RuntimeConfigLKG.cs
- XsltContext.cs
- X509Utils.cs
- HelpExampleGenerator.cs
- PropertyChangeTracker.cs
- Msec.cs
- CustomAttributeBuilder.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- PermissionSetTriple.cs
- BaseAppDomainProtocolHandler.cs
- FileChangesMonitor.cs
- IntPtr.cs
- CompressedStack.cs
- DateTimeOffset.cs
- ReflectionPermission.cs
- ToolStripDropDownDesigner.cs
- PolyLineSegmentFigureLogic.cs
- ColumnWidthChangingEvent.cs
- PriorityBinding.cs
- ParameterToken.cs
- Span.cs
- ArgumentNullException.cs
- SecuritySessionServerSettings.cs
- FlowPanelDesigner.cs
- OperationAbortedException.cs
- RegexFCD.cs
- BitmapEditor.cs
- RecordBuilder.cs
- _LoggingObject.cs
- ActivationServices.cs
- CanonicalFormWriter.cs
- DataView.cs
- BitmapEffectInput.cs
- TakeOrSkipWhileQueryOperator.cs
- MailAddressCollection.cs
- UIElement.cs
- OutputCacheSection.cs
- MethodRental.cs
- DbConnectionPoolCounters.cs
- Thread.cs
- PropVariant.cs
- StylusPointProperty.cs
- XmlReflectionMember.cs
- OrderedParallelQuery.cs
- Cloud.cs
- JpegBitmapDecoder.cs
- IdentityNotMappedException.cs
- DataBindingExpressionBuilder.cs
- SharedPersonalizationStateInfo.cs
- CollectionConverter.cs
- StandardBindingImporter.cs
- DefinitionUpdate.cs
- SHA1.cs
- ImageInfo.cs
- InfoCardCryptoHelper.cs
- Types.cs
- MobileUserControlDesigner.cs
- TimelineCollection.cs
- StringFreezingAttribute.cs
- BamlBinaryReader.cs
- Accessible.cs
- ApplicationServicesHostFactory.cs
- UIElementParaClient.cs
- ComponentEditorPage.cs
- RecipientIdentity.cs
- NamedElement.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- ProcessProtocolHandler.cs
- DesignTimeTemplateParser.cs
- FileFormatException.cs
- PropertyStore.cs
- GridItem.cs
- MiniMapControl.xaml.cs
- BuildProviderUtils.cs
- UniqueIdentifierService.cs
- Ops.cs
- MembershipPasswordException.cs
- CodeRemoveEventStatement.cs
- MatrixKeyFrameCollection.cs
- MethodInfo.cs
- RawStylusInputReport.cs
- OleDbDataAdapter.cs
- AnimatedTypeHelpers.cs