upload arduino code to arduino using winform c#

I build code editor for arduino with winform C# and i am doing very well with my project. My editor allows Autocomplete And provides help during programming. My only problem is how to upload the code i wrote to arduino? for example, if someone writes on my editor this code:

int led = 13;

void setup() { pinMode(led, OUTPUT); }

void loop() { digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000); } How do I upload that to arduino with c#?

In the IDE in File, Preferences there is the option to use an external editor. Then you use the IDE to compile and upload the code written in the external editor.

You can use the IDE from the command line. This Thread illustrates the idea.

…R