BrunoEarth BrunoEarth - 1 year ago 229
C# Question

How to run c# code using notepad++?

I have trouble executing code that I have written in notepad++. As from what I have researched online, I should edit path in system variable to this C:\Windows\Microsoft.NET\Framework64\v4.0.30319. I have already changed it and it's still not working. After I type in test.cs, a windows form will pop up stating that windows can't open this file. Here is an image of my command line:

CMD Picture

Here is also the small code that I have written:

using System;

public class Test
static void Main()

Answer Source

After compiling you c# file, execute it by just typing the name in your command prompt. Don't use extension again. Just type


after compiling successfully in your cmd prompt, and you'll be fine. You can also use


to run it instead of just test.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download