> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/api/csharp/yarn.compiler/yarn.compiler.utility/yarn.compiler.utility.getyarnvalue.md).

# GetYarnValue(IConvertible)

Method in [Utility](/api/csharp/yarn.compiler/yarn.compiler.utility.md)

## Summary

Returns an [IYarnValue](/api/csharp/yarn/yarn.iyarnvalue.md) representation of the provided value.

```csharp
public static IYarnValue? GetYarnValue(IConvertible clrValue)
```

## Parameters

| Name                           | Description                                |
| ------------------------------ | ------------------------------------------ |
| `System.IConvertible` clrValue | The value to get a Yarn representation of. |

## Returns

An [IYarnValue](/api/csharp/yarn/yarn.iyarnvalue.md) representation of `clrValue` .
