TypeExt.ThrowIfInvalidCast Method

Throws an InvalidCastException if the type defined by from can’t be casted to the type defined by [!:to].

Namespace: UltimateXR.Extensions.System
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static void ThrowIfInvalidCast(
	Type from,
	Type to
)

Parameters

 

from
Type: System.Type
Source type
to
Type: System.Type
Destination type

Exceptions

ExceptionCondition
InvalidCastExceptionThrown when the source type can’t be casted to the destination type

See Also

Reference

TypeExt Class
UltimateXR.Extensions.System Namespace