一个简单的C# program:
using System;
namespace dotnetapp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("What is your favourite Web Application Language?");
String answer = Console.ReadLine();
Console.WriteLine("Your answer was: " + answer + "rn");
}
}
}
保存为1.cs
可以直接利用Windows自带的csc.exe将上面的1.cs编译为1.exe
位于C:WindowsMicrosoft.NETFramework64v4.0.30319csc.exe
在cmd命令里,直接:
C:WindowsMicrosoft.NETFramework64v4.0.30319csc.exe 1.cs
如果找不到,可以去启动和关闭Windows功能里,对.NET进行勾选
反编译工具为dnSpy,直接将生成的exe文件拖入即可



