Did this ever occur to you?
You wanted to write several lines of C# code to clarify some syntax or parameter format, or you needed a one-time program to process log files. You started Visual Studio 2005/2008, created a new console application project, wrote several lines of code, then build, run, and finally got the result. What if the answer you wanted to know is simply whether decimal.ToString("N2") will return the correct formatted number? How long have you been waited before writing the first line of code? After you got the answer, would you spend several seconds to delete the *.csproj, *.cs files?
Quite often I felt that I spent 60% of my time on waiting for Visual Studio initialization and project operation, 40% on coding and execution, and it ended up left a whole bunch of unnessary files in my workspace. This is not efficient at all! In these cases, Visual Studio is too heavy, but coding with notepad and csc.exe is too lousy. What I really need is a light-weight IDE than can startup in one second and allows me to edit the code directly and run it with one click. So, here is my Mini C# Coding Lab.
Mini C# Lab is a .NET 2.0 winform application with single 13KB exe file. As you see, the UI is quite simple and easy to use. Write the code on the code editor, then click "Run" button to check the result. The colorful formatting effect is based on Manoli's CSharpFormat. I use an easy, stupid but inefficient way to implement the formatting, so it's not real time. The RichTextEditor refreshes every time when you press after up/down/enter key, so don't try to edit a very long code. (It's only for "mini", right?)
The code is running in another thread, so you can stop it if it hang or the time is longer than you expected. Mini C# Lab also provide simple open and save function, so you can keep your source code in single .cs file for furture use.
OK, that's all, try it and feel free to send me feedback
只想寫兩行Code，試試某個語法的效果，或做個一次性轉檔。為了這幾行Code，你得開啟Visual Studio，等待它啟動，建一個專案，寫兩行Code，建置、執行、搞定，然後留下一整個專案資料夾跟一堆不會再用第二次的檔案。算一算，寫Code只花了40%的時間，卻花了60%的時間等待Visual Studio的啟動及建立專案上，更甭提這個"免洗"專案所留下的一堆殘檔。
Mini C# Lab是一個.NET 2.0 WinForm程式，只有一個13KB的獨立執行檔，免安裝，直接執行即可。你可以用上面的編輯視窗直輸入寫C#程式，利用Console輸出結果。編輯欄位我用了Manoli's CSharpFormat標出顏色，不過用的是簡單但笨拙的做法，一整行寫完後才會更新，而且，由於它每次整段程式都要重新顯示，不適合太長的程式碼。(記住，我本來只是想"Mini"而已呀!)