Validates if the actual value of an object equals an expected value.
| C# | Visual Basic | Visual C++ |
public static bool AreEqual( Object actual, Object expected, string message, Validate..::.Options options )
Public Shared Function AreEqual ( _ actual As Object, _ expected As Object, _ message As String, _ options As Validate..::.Options _ ) As Boolean
public: static bool AreEqual( Object^ actual, Object^ expected, String^ message, Validate..::.Options^ options )
- actual (Object)
- The actual value of the object.
- expected (Object)
- The expected value of the object.
- message (String)
- The message to log. "{0}" is replaced by the string representation of actual, "{1}" by the string representation of expected.
- options (Validate..::.Options)
- Additional Validate..::.Options for this validation action.
True if actual and expected are
equal; otherwise false.
| Exception | Condition |
|---|---|
| ValidationException | If the validation fails and
options.ExceptionOnFail is true. |
