TypeExt.CanCastTo Method
Checks whether the type defined by self can 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 bool CanCastTo(
this Type self,
Type to
)
Parameters
- self
- Type: System.Type
Source type - to
- Type: System.Type
Destination type
Return Value
Type: Boolean
Whether it can be casted
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).