Interface ICastable<T>
Defines a series of members to be implemented by an object that allows casting from its type to another.
Namespace: TheXDS.MCART.Types.Base
Assembly: MCART.dll
Syntax
public interface ICastable<T>
Type Parameters
Name | Description |
---|---|
T | Target type for the conversion. |
Methods
| Edit this page View SourceCast()
Converts the current instance to an object of type T
.
Declaration
T Cast()
Returns
Type | Description |
---|---|
T | An object of type |
TryCast(out T)
Attempts to perform a conversion operation of the current
instance to an object of type T
.
Declaration
bool TryCast(out T result)
Parameters
Type | Name | Description |
---|---|---|
T | result | Result of the conversion. |
Returns
Type | Description |
---|---|
bool |