How to quickly code and run small C# code

后端 未结 19 1678
再見小時候
再見小時候 2021-01-31 01:46

There are times when I want to test new code from the forums or when I need to help my friends with specific C# problem. The problem is I don\'t want to create new \"project\" i

19条回答
  •  庸人自扰
    2021-01-31 02:08

    A bit late to the party, but I came here while searching for this myself.

    The best suitable solution for me was using the C# Interactive-window inside Visual Studio 2015 or later. You can access it by opening it via View > Other Windows > C# Interactive, or by selecting some c# code and clicking on Execute in Interactive in the right-click context menu.

    Here is a link on how to use it: http://dailydotnettips.com/2016/01/12/use-c-interactive-window-for-your-coding-experiment-in-visual-studio-2015/

    I know it works in VS2015, I don't think it works in older versions.

提交回复
热议问题