How to quickly code and run small C# code

后端 未结 19 1600
再見小時候
再見小時候 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 01:52

    Have a look at Introducing the Microsoft “Roslyn” CTP.

    The "C# Interactive" window is perfect for this.

    0 讨论(0)
  • 2021-01-31 01:53

    You can try using ScriptCS. It uses the Roslyn compiler to create a scripting language using C#.

    0 讨论(0)
  • 2021-01-31 01:55

    I always keep a copy of Express Edition running; this can execute and debug projects without needing a proper file location (as long as you don't hit save). Does the job for me...

    0 讨论(0)
  • 2021-01-31 01:57

    you could have a look into C# Scripting.

    C# scripting

    this is ment to allow you to build fast scripts without the use of the IDE.

    HTH

    bones

    0 讨论(0)
  • 2021-01-31 01:58

    Late in here, but if you also want to share the code with others, then .NET Fiddle is the best I have tried so far. For offline solutions, LINQPad definitely would have my vote as well, and not just for LINQ queries.

    0 讨论(0)
  • 2021-01-31 02:02

    Try SharpDevelop. It doesn't contain everything, but is good for quick examples. You can open a solution and easily swap out the code to test something else. In the project properties you can change a solution from console to window app via a combobox selection. You can easily translate your code from C# to Boo, Python, Ruby or VB, or from any of these languages to another, starting with whatever your source is. Therefore, if you go looking for a problem solution on the web and can't find one in VB - but do find one in C#, you may be able to convert it.

    0 讨论(0)
提交回复
热议问题