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