Method CastTo
CastTo(ArcadeExpressionReturnType)
Cast the result of an evaluation to another type using the arcade casting rules.
Declaration
public object CastTo(ArcadeExpressionReturnType type)
Parameters
Type | Name | Description |
---|---|---|
ArcadeExpressionReturnType | type | The type to cast to. |
Returns
Type | Description |
---|---|
Object | An object of the requested type or |
Remarks
Attempts to cast to the required type using the arcade casting rules. Arcade does not throw
exceptions when its casting fails, instead it returns a null
value, or NaN in the case of casting to a number.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.14 - 100.15 |
.NET 6.0 | 100.14 - 100.15 |
.NET 6.0 Windows | 100.14 - 100.15 |
.NET Framework | 100.14 - 100.15 |
Xamarin.Android | 100.14 - 100.15 |
Xamarin.iOS | 100.14 - 100.15 |
UWP | 100.14 - 100.15 |