(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Windows.Forms / Gtk / DataGridCell.cs
blob9fc0c2a3b234063568dce41692cec2a6729f36f6
1 //
2 // System.Windows.Forms.DataGridCell.cs
3 //
4 // Author:
5 // Dennis Hayes (dennish@raytek.com)
6 //
7 // (C) 2002 Ximian, Inc. http://www.ximian.com
8 //
10 using System;
12 namespace System.Windows.Forms {
14 public struct DataGridCell {
16 private int rownumber;
17 private int columnnumber;
19 // -----------------------
20 // Public Constructor
21 // -----------------------
23 /// <summary>
24 ///
25 /// </summary>
26 ///
27 /// <remarks>
28 ///
29 /// </remarks>
31 public DataGridCell (int r, int c)
33 rownumber = r;
34 columnnumber = c;
37 // -----------------------
38 // Public Shared Members
39 // -----------------------
41 /// <remarks>
42 /// Compares two DataGridCell objects. The return value is
43 /// based on the equivalence of the RowNumber and ColumnNumber properties of the two objects.
44 /// </remarks>
46 public static bool operator == (DataGridCell dgc_a,
47 DataGridCell dgc_b) {
49 return ((dgc_a.rownumber == dgc_b.rownumber) &&
50 (dgc_a.columnnumber == dgc_b.columnnumber));
53 /// <summary>
54 /// Inequality Operator
55 /// </summary>
56 ///
57 /// <remarks>
58 /// Compares two DataGridCell objects. The return value is
59 /// based on the equivalence of the RowNumber and ColumnNumber properties of the two objects.
60 /// </remarks>
61 public static bool operator != (DataGridCell dgc_a,
62 DataGridCell dgc_b) {
63 return ((dgc_a.rownumber != dgc_b.rownumber) ||
64 (dgc_a.columnnumber != dgc_b.columnnumber));
67 // -----------------------
68 // Public Instance Members
69 // -----------------------
72 public int RowNumber {
73 get{
74 return rownumber;
76 set{
77 rownumber = value;
81 public int ColumeNumber {
82 get{
83 return columnnumber;
85 set{
86 columnnumber = value;
90 /// <summary>
91 /// Equals Method
92 /// </summary>
93 ///
94 /// <remarks>
95 /// Checks equivalence of this DataGridCell and another object.
96 /// </remarks>
98 public override bool Equals (object obj)
100 if (!(obj is DataGridCell))
101 return false;
103 return (this == (DataGridCell) obj);
106 /// <summary>
107 /// GetHashCode Method
108 /// </summary>
110 /// <remarks>
111 /// Calculates a hashing value.
112 /// </remarks>
114 public override int GetHashCode ()
116 return (int)( rownumber ^ columnnumber);
119 /// <summary>
120 /// ToString Method
121 /// </summary>
123 /// <remarks>
124 /// Formats the DataGridCell as a string.
125 /// </remarks>
127 public override string ToString ()
129 return String.Format ("[{0},{1}]", rownumber, columnnumber );