Tries to convert the provided value to the specified type.
- Namespace
- Statiq
.Common - Containing Type
- TypeHelper
Syntax
public static bool TryConvert(object value, Type type, out object result)
Parameters
| Name | Type | Description |
|---|---|---|
| value | object | The value to convert. |
| type | Type | The desired return type. |
| result | object | The result of conversion. |
Return Value
| Type | Description |
|---|---|
| bool | true if the value could be converted to the desired type, false otherwise. |