# ConvertTo\<T>()

Method in [IYarnValue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.iyarnvalue)

## Summary

Converts this [IYarnValue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.iyarnvalue) to type `T` .

```csharp
public T ConvertTo<T>()
    where T : IConvertible;
```

## Type Parameters

| Name | Description             |
| ---- | ----------------------- |
| T    | The type to convert to. |

## Returns

A value of type T.
