C# Console/CLI Interpreter?

后端 未结 17 1983
眼角桃花
眼角桃花 2020-12-24 07:57

I wonder if there is something like a standalone Version of Visual Studios \"Immediate Window\"? Sometimes I just want to test some simple stuff, like \"DateTime.Parse(\"bla

17条回答
  •  旧巷少年郎
    2020-12-24 08:07

    Along the lines of lassevk's answer, I've got "Snippy". This was developed for C# in Depth, and the UI is pretty rubbish, but it works - and lets you write extra members (methods, nested classes etc) as well, e.g.

    public static void Foo()
    { 
        Console.WriteLine("Hello");
    }
    ...
    Foo();
    

    (The ... is used to tell Snippy "everything under here belongs in Main".)

提交回复
热议问题