DataGridCell.Equals(Object) 方法   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个值,该值指示 DataGridCell 是否与第二个 DataGridCell 完全相同。
public:
 override bool Equals(System::Object ^ o);public override bool Equals (object o);override this.Equals : obj -> boolPublic Overrides Function Equals (o As Object) As Boolean参数
- o
- Object
一个要比较的对象。
返回
如果第二个对象与第一个完对象全相同,则为 true;否则,为 false。
示例
以下示例比较两个 DataGridCell 对象。
Private Sub CompareCells()
    Dim currCell As DataGridCell
    Dim cell2 As DataGridCell
 
    currCell = DataGrid1.CurrentCell
    cell2.ColumnNumber = 0
    cell2.ColumnNumber = 0
    ' This won't return true until you select row 0, column 0.
    Console.WriteLine(currCell.Equals(cell2))
 End Sub