# TryGetProperty(ref TSet, object, out IProperty<TSet>)

> Gets the property associated with the specified name.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Properties](/engine/6000.7/script-reference/unity/properties.md)
* **Assembly:** UnityEngine.PropertiesModule

## TryGetProperty(T, Object, IProperty\<T>)

```csharp
public bool TryGetProperty(ref TSet container, object key, out IProperty<TSet> property)
```

### Parameters

**** (T): The container hosting the data.**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): The key to lookup.**** (\[IProperty\<T>]\(/engine/6000.7/script-reference/unity/properties/iproperty)): When this method returns, contains the property associated with the specified name, if the name is found; otherwise, null.

### Returns

| Type                                                          | Description                                                                                                                                                                           |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the [INamedProperties\<TContainer>](/engine/6000.7/script-reference/unity/properties/inamedproperties1.md) contains a property with the specified name; otherwise, `false`. |
