# TryGetValue<T>(out T)

> Retrieves the value of the constant node as the specified type.

## Definition

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

## TryGetValue\<T>(T)

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

### Parameters

**** (T): The output parameter that holds the value if the conversion is successful.

### Returns

| Type                                                          | Description                                                                         |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the value was successfully retrieved and cast to `T`; otherwise, `false`. |

### Remarks

This method provides type-safe access to the constant's stored value. It performs a type check and conversion internally. If the value cannot be cast to `T`, the method returns `false` and `value` is set to the default value of `T`.
