Click or drag to resize
Ranorex

ValidateAreEqual Method (Object, Object, String, Boolean)

Validates if the actual value of an object equals an expected value.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static bool AreEqual(
	Object actual,
	Object expected,
	string message,
	bool exceptionOnFail
)

Parameters

actual
Type: SystemObject
The actual value of the object.
expected
Type: SystemObject
The expected value of the object.
message
Type: SystemString
The message to log. "{0}" is replaced by the string representation of actual, "{1}" by the string representation of expected.
exceptionOnFail
Type: SystemBoolean
A value specifying if an exception should be thrown if the validation fails.

Return Value

Type: Boolean
True if actual and expected are equal; otherwise false.
Exceptions
ExceptionCondition
ValidationExceptionIf the validation fails and exceptionOnFail is true.
See Also