TypeProvider.IsAssignable(Type, Type) Method

Definition

Indicates whether one type can be safely assigned to another type.

public static bool IsAssignable(Type toType, Type fromType);

Parameters

toType
Type

The target Type of the assignment.

fromType
Type

The source Type of the assignment.

Returns

true if the assignment can be safely made; otherwise false.

Applies to

Produkt Verze
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1