Table of Contents

Class DifferentTypes

Namespace
Tharga.Toolkit.Compare
Assembly
Tharga.Toolkit.Standard.dll

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

objectName string

The name or path of the object where the type mismatch was found.

type Type

The type of the first object.

otherType Type

The type of the second object.

index int?

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

string

ObjectName

Gets the name or path of the object where the type mismatch was found.

public string ObjectName { get; }

Property Value

string

OtherObjectName

Gets the name of the other object. Always returns an empty string for type differences.

public string OtherObjectName { get; }

Property Value

string