# TryConvert<TSource, TDestination>(ref TSource, out TDestination)

> Converts the specified value from TSource to TDestination using the registered global converters.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

## TryConvert\<T, U>(T, T)

```csharp
public static bool TryConvert<TSource, TDestination>(ref TSource source, out TDestination destination)
```

### Parameters

**** (T): The source value to convert.**** (T): The converted destination value if the conversion succeeded, and the default value otherwise.

### Returns

| Type                                                          | Description                                                |
| ------------------------------------------------------------- | ---------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the conversion succeeded, and `false` otherwise. |
