# TryParse<T>(string, out T)

> Try to parse an expression into a number.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Search](/engine/6000.5/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

## TryParse\<T>(string, T)

```csharp
public static bool TryParse<T>(string expression, out T result)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Expression to be parsed.**** (T): Type of the numeric value.

### Returns

| Type                                                          | Description                          |
| ------------------------------------------------------------- | ------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the parsing succeed. |
