Unable to properly use VS Serial Monitor but Arduino IDE works

The arduino Serial Monitor and Visual Studio are both PC programs that do similar jobs, Visual Studio can be made a little more flexible in my opinion.

If you try the example I posted and it works ok then maybe you would like to try the next step which is to read the value of the character you are sending.

Here we modify the arduino sketch to echo only the character value sent by Visual Studio

char receivedChar;
boolean newData = false;

void setup() {
 Serial.begin(9600);
 Serial.println("<Arduino is ready>");
}

void loop() {
 recvOneChar();
 showNewData();
}

void recvOneChar() {
 if (Serial.available() > 0) {
 receivedChar = Serial.read();
 newData = true;
 }
}

void showNewData() {
 if (newData == true) {
 //Serial.print("This just in ... ");
 Serial.print(receivedChar);
 newData = false;
 }
}

At the C# end we add a new routine that displays the value instead of the character, this routine is called byteDebug.

 private void byteDebug(byte sData)
        {

            
            richTextBox1.AppendText(sData + " ");

        }

The invoke for this delegate also needs the name change, change the following line

this.BeginInvoke((new myDelegate(stringDebug)), myData);

to this

this.BeginInvoke((new myDelegate(byteDebug)), myData);

When you run this it really is a good idea to have a copy of the ASCII table close by so that you understand which characters the numbers represent.