Guard.IsReferenceEqualTo<T>(T, T, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Asserts that the input value must be the same instance as the target value.
public static void IsReferenceEqualTo<T> (T value, T target, string name) where T : class;
static member IsReferenceEqualTo : 'T * 'T * string -> unit (requires 'T : null)
Public Shared Sub IsReferenceEqualTo(Of T As Class) (value As T, target As T, name As String)
Type Parameters
- T
The type of input values to compare.
Parameters
- value
- T
The input T
value to test.
- target
- T
The target T
value to test for.
- name
- String
The name of the input parameter being tested.
Exceptions
Thrown if value
is not the same instance as target
.
Remarks
The method is generic to prevent using it with value types.