InstanceAs Method
Definition
- Namespace
- Cuemon.Extensions
- Assemblies
- Cuemon.Extensions.Core.dll
InstanceAs<TResult>()
Returns a value that is equivalent to the instance of the object that this wrapper represents.
public TResult InstanceAs<TResult>()
Returns
- TResult
A value that is equivalent to the instance of the object that this wrapper represents.
Type Parameters
TResultThe type of the return value.
Exceptions
- InvalidCastException
The conversion is not supported - or - Instance does not implement the IConvertible interface.
- FormatException
Instance is not in a format for
Trecognized by InvariantCulture.- OverflowException
Instance represents a number that is out of the range of
T.
InstanceAs<TResult>(IFormatProvider)
Returns a value that is equivalent to the instance of the object that this wrapper represents.
public TResult InstanceAs<TResult>(IFormatProvider provider)
Parameters
providerIFormatProviderAn object that supplies culture-specific formatting information.
Returns
- TResult
A value that is equivalent to the instance of the object that this wrapper represents.
Type Parameters
TResultThe type of the return value.
Exceptions
- InvalidCastException
The conversion is not supported - or - Instance does not implement the IConvertible interface.
- FormatException
Instance is not in a format for
Trecognized byprovider.- OverflowException
Instance represents a number that is out of the range of
T.