Send numbers simply?

Hi,
I am looking for the simplest way to send numbers over usb to an uno from a c# program and from the uno to the c# program?
There's a lot of example code but what's the simplest way?

The idea is this;

The uno will be programed with a set of functions identified by numbers.
When the c# program sends a number, the arduino runs the corresponding function.

For example we'll say if the uno gets a 56
It runs function 56 of my sketch.
Function 56 could be anything but for this example we'll say it sets all output pins to 0 then checks all input pins, does a calculation and sends a number back to the c# program. What exactly each number does is irrelevant.

All I want is to send numbers back and forth.

I can figure the rest out.

Edit; I have been reading up on this. Eventually I'll figure it out but at the moment I am confused.

It is a lot easier to send numbers as human readable characters. Have a look at the examples in Serial Input Basics. The system in the 3rd example will be most reliable. There is also a parse example.

If all you want to do is send characters to cause an Arduino to select different options I suggest you just send a single character such as 'A' or 'h'. Between the upper and lower case characters and the number characters there are 62 options. That will make the code on the Arduino very simple.

...R

Thanks, I'll read that