Question: I'm new to C# but trying to use an enum. The enum is as follows:

```
public enum PARAM : int { ROLL = 1, PITCH, YAW, MAGX, MAGY, MAGZ, BCA, OAT, IAS, TAS, VOLTS, AOA };

```

I'm using it as follows:

```
AhrsCom.setCommand("$out=" + PARAM.PITCH + ",10\n\r");

```

However, it passes the following string to `setCommand(string command)`:

```
"$out=PITCH,10\n\r"

```

Instead of `out=2,10\n\r`, as I thought it would.

Answer: 
You can cast the enum to an `int` to gets it numeric value:

```
AhrsCom.setCommand("$out=" + (int)PARAM.PITCH + ",10\n\r");

```
You can cast this way:

```
AhrsCom.setCommand("$out=" + (int)PARAM.PITCH + ",10\n\r");

```