Controlling Arduino with C#

0r start conversion at index 1, just after the A. This keeps the original string intact, optionally for later use. Note: added a var cmd to hold the type of command.

char cmd = inData[0]; 
int val = atoi( &inData[1] );