# GetVariable Method

## Overloads

| [GetVariable(String)](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetVariable.htm#Qlik_Engine_IApp_GetVariable_System_String_) |  | Returns a handle to a variable. |
| --- | --- | --- |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetVariable.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IApp.GetVariable.htm)

## GetVariable(String)

Returns a handle to a variable.

### Declaration

```

          [Obsolete("Use _Doc::GetVariableById_ method or _Doc::GetVariableByName_ method instead")]
Variable GetVariable([QixName("qName")] string name)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | name | Name of the variable. |

### Returns

| Type | Description |
| --- | --- |
| [Variable](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Variable.htm) |  |