Class DifferentTypes
Represents a difference where two compared objects have different types.
public class DifferentTypes : IDiff
- Inheritance
-
DifferentTypes
- Implements
- Inherited Members
- Extension Methods
Constructors
DifferentTypes(string, Type, Type, int?)
Initializes a new instance of the DifferentTypes class.
public DifferentTypes(string objectName, Type type, Type otherType, int? index)
Parameters
objectNamestringThe name or path of the object where the type mismatch was found.
typeTypeThe type of the first object.
otherTypeTypeThe type of the second object.
indexint?The collection index where the difference was found, or null if not applicable.
Properties
Index
Gets the collection index where the difference was found, or null if not applicable.
public int? Index { get; }
Property Value
- int?
Message
Gets a description of the type difference.
public string Message { get; }
Property Value
ObjectName
Gets the name or path of the object where the type mismatch was found.
public string ObjectName { get; }
Property Value
OtherObjectName
Gets the name of the other object. Always returns an empty string for type differences.
public string OtherObjectName { get; }