# TryGetDefaultValue<T>(out T)

> Retrieves the default value of the variable.

## Definition

* **Type:** Method
* **Namespace:** [Unity.GraphToolkit.Editor](/engine/6000.5/script-reference/unity/graphtoolkit/editor.md)
* **Assembly:** UnityEditor

## TryGetDefaultValue\<T>(T)

```csharp
bool TryGetDefaultValue<T>(out T value)
```

### Parameters

**** (T): The retrieved default value, if available.

### Returns

| Type                                                          | Description                                                                      |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if a default value exists and is of the correct type; otherwise, `false`. |

### Remarks

Use this method to retrieve the variable’s default value in a type-safe way.
