DataGridCell.Equals(Object) Metoda

Definicja

Pobiera wartość wskazującą, czy DataGridCell wartość jest identyczna z sekundą DataGridCell.

public:
 override bool Equals(System::Object ^ o);
public override bool Equals (object o);
override this.Equals : obj -> bool
Public Overrides Function Equals (o As Object) As Boolean

Parametry

o
Object

Obiekt, który chcesz porównać.

Zwraca

Boolean

true jeśli drugi obiekt jest identyczny z pierwszym; w przeciwnym razie , false.

Przykłady

Poniższy przykład porównuje dwa DataGridCell obiekty.

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

Dotyczy