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
- TypeGeneratedEventArgs.cs
- ShaperBuffers.cs
- SimpleFieldTemplateUserControl.cs
- HttpRequestWrapper.cs
- UidManager.cs
- Point4D.cs
- DelegateTypeInfo.cs
- CurrencyManager.cs
- ImageAutomationPeer.cs
- WindowsFormsHostPropertyMap.cs
- XMLDiffLoader.cs
- PLINQETWProvider.cs
- TimeIntervalCollection.cs
- DownloadProgressEventArgs.cs
- DrawListViewColumnHeaderEventArgs.cs
- LineBreakRecord.cs
- CodeSubDirectory.cs
- HyperlinkAutomationPeer.cs
- VisualProxy.cs
- QilGeneratorEnv.cs
- RegisteredExpandoAttribute.cs
- QueueProcessor.cs
- AnimationClock.cs
- DSASignatureFormatter.cs
- WorkflowViewElement.cs
- ReadOnlyAttribute.cs
- ColumnBinding.cs
- Int16AnimationBase.cs
- SQLInt32Storage.cs
- GenericUI.cs
- ProviderSettingsCollection.cs
- ReadOnlyHierarchicalDataSource.cs
- SqlNode.cs
- ConfigurationSectionHelper.cs
- TableCell.cs
- AppDomainUnloadedException.cs
- ProcessModule.cs
- SecUtil.cs
- Attributes.cs
- X509Certificate2Collection.cs
- _AutoWebProxyScriptHelper.cs
- HtmlPhoneCallAdapter.cs
- UpdateExpressionVisitor.cs
- ConsoleCancelEventArgs.cs
- XMLDiffLoader.cs
- PersonalizationStateInfoCollection.cs
- Message.cs
- Operand.cs
- XmlSchema.cs
- ConditionCollection.cs
- DoubleCollectionConverter.cs
- Win32.cs
- ApplicationException.cs
- ReadingWritingEntityEventArgs.cs
- HttpMethodConstraint.cs
- Translator.cs
- DateTimeFormat.cs
- ExpressionVisitor.cs
- MemoryPressure.cs
- TextTreeUndoUnit.cs
- Mapping.cs
- Icon.cs
- UnauthorizedWebPart.cs
- IsolatedStorageException.cs
- FigureParagraph.cs
- OpenFileDialog.cs
- XamlToRtfWriter.cs
- DataGridCellItemAutomationPeer.cs
- MarkedHighlightComponent.cs
- SmtpClient.cs
- LifetimeServices.cs
- FullTrustAssembly.cs
- EventListenerClientSide.cs
- PrePostDescendentsWalker.cs
- Grant.cs
- LogConverter.cs
- AnnotationStore.cs
- SemanticValue.cs
- BindableTemplateBuilder.cs
- ThumbButtonInfo.cs
- DescendantBaseQuery.cs
- RefreshEventArgs.cs
- AlternationConverter.cs
- InternalResources.cs
- MemberCollection.cs
- ServiceReference.cs
- columnmapfactory.cs
- MiniCustomAttributeInfo.cs
- SQLMoneyStorage.cs
- ResetableIterator.cs
- MiniLockedBorderGlyph.cs
- UIElement.cs
- HiddenFieldPageStatePersister.cs
- DataGridTableCollection.cs
- DataSourceView.cs
- ItemCollection.cs
- ToggleProviderWrapper.cs
- SqlDataReader.cs
- NullableBoolConverter.cs
- ReadOnlyHierarchicalDataSource.cs