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
- SmiGettersStream.cs
- SerialStream.cs
- XslAstAnalyzer.cs
- ClientConfigurationHost.cs
- CancellationToken.cs
- SrgsOneOf.cs
- SchemaUtility.cs
- DataGridColumnCollection.cs
- ApplicationDirectoryMembershipCondition.cs
- DataServiceStreamResponse.cs
- Debug.cs
- RoleGroup.cs
- PageStatePersister.cs
- BuildProvider.cs
- DynamicDocumentPaginator.cs
- VariableQuery.cs
- PriorityChain.cs
- ByteStack.cs
- FormsAuthenticationConfiguration.cs
- ExtensibleClassFactory.cs
- Gdiplus.cs
- XmlDataDocument.cs
- FixedNode.cs
- WorkflowPersistenceService.cs
- base64Transforms.cs
- DbDeleteCommandTree.cs
- DataBindingHandlerAttribute.cs
- UIElement3D.cs
- SqlCacheDependencySection.cs
- ListControlConvertEventArgs.cs
- DataPointer.cs
- HttpRuntime.cs
- FixUp.cs
- CodeBinaryOperatorExpression.cs
- SimpleMailWebEventProvider.cs
- Transform3DGroup.cs
- DynamicDocumentPaginator.cs
- StickyNote.cs
- ProgressiveCrcCalculatingStream.cs
- Parameter.cs
- UIAgentAsyncBeginRequest.cs
- ContainsRowNumberChecker.cs
- LinqTreeNodeEvaluator.cs
- PropertyNames.cs
- LinkUtilities.cs
- TagMapCollection.cs
- StartUpEventArgs.cs
- UrlMapping.cs
- BackoffTimeoutHelper.cs
- StringPropertyBuilder.cs
- HtmlElement.cs
- XmlReflectionMember.cs
- DateTimePickerDesigner.cs
- DirectionalLight.cs
- HtmlHistory.cs
- DetailsViewInsertedEventArgs.cs
- Imaging.cs
- OdbcError.cs
- DeleteIndexBinder.cs
- HtmlTableCell.cs
- WindowsGraphics2.cs
- FormsAuthenticationEventArgs.cs
- ThemeDirectoryCompiler.cs
- BindToObject.cs
- MdImport.cs
- ServiceBuildProvider.cs
- UriSectionData.cs
- RegexInterpreter.cs
- GenericUriParser.cs
- HWStack.cs
- Console.cs
- HttpProfileBase.cs
- TreeView.cs
- AnimationException.cs
- GridItemPattern.cs
- SpotLight.cs
- TypeUtil.cs
- SByte.cs
- PopOutPanel.cs
- StringHelper.cs
- CompilerErrorCollection.cs
- StylusPoint.cs
- wmiutil.cs
- Operators.cs
- COM2FontConverter.cs
- Base64Decoder.cs
- BamlMapTable.cs
- ChannelServices.cs
- RelatedCurrencyManager.cs
- GridViewPageEventArgs.cs
- TabItem.cs
- WebPartsPersonalization.cs
- SocketPermission.cs
- DateTimeParse.cs
- QueryReaderSettings.cs
- HttpBrowserCapabilitiesWrapper.cs
- ChineseLunisolarCalendar.cs
- SelectedDatesCollection.cs
- HtmlButton.cs
- ValidationError.cs