# Sandbox.ConsoleSystem.GetValue

```csharp
static string GetValue(string name, string defaultValue = null)
```

Get a console variable's value as a string.

### Parameters

- `name` (`string`)
- `defaultValue` (`string`), default `null`

### Returns

`string`

Declared in [Sandbox.ConsoleSystem](/api/Sandbox.ConsoleSystem).
Assembly: `Sandbox.Engine`.
