2008-02-18

Catch exceptions in debug mode

Debug->Exceptions 或是 Ctrl+Alt+E
把Common Language Runtime Exceptions旁的Throw打勾, 確定
 
如此在debug時, 被try catch包起來的錯誤會讓debugger抓到錯誤的那一行

2008-02-05

Get Windows version

System.Environment.OSVersion.ToString
 
Win2000 => Microsoft Windows NT 5.0.XXXX
WinXP=> Microsoft Windows NT 5.1.XXXX
Win2003 => Microsoft Windows NT 5.2.XXXX