This documentation is archived and is not being maintained.

Unit Equality Operator

Compares two Unit objects to determine whether they are equal.

[Visual Basic]
returnValue = Unit.op_Equality(left, right)
[C#]
public static bool operator ==(
 Unit left,
 Unit right
);
[C++]
public: static bool op_Equality(
 Unit left,
 Unit right
);
[JScript]
returnValue = left == right;

[Visual Basic] In Visual Basic, you can use the operators defined by a type, but you cannot define your own. You can use the Equals method instead of the Unit equality operator.

[JScript] In JScript, you can use the operators defined by a type, but you cannot define your own.

Arguments [Visual Basic, JScript]

left
The Unit on the left side of the operator.
right
The Unit on the right side of the operator.

Parameters [C#, C++]

left
The Unit on the left side of the operator.
right
The Unit on the right side of the operator.

Return Value

true if both Unit objects are equal; otherwise, false.

Remarks

Use this operator to compare two Unit objects for equality. For both objects to be equal, they must have the same values for both the Type and Value properties.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

Unit Structure | Unit Members | System.Web.UI.WebControls Namespace

Show: