Designing .NET Class Libraries: API Usability由於我經常去博客網看一些高手的文章,也常常看到他們利用工具將自己的程式碼格式化後在貼上來,整個的規格相當整齊,真是令我羨慕~~還好現在找到了CodeHighlighter

要完整安裝使用這套服務,不僅僅要將轉換出來的程式碼複製過來,還要事先將數個檔案複製過來,貼在自己目錄下的  /Images/OutliningIndicators/ ,要有哪些檔案呢? 就先複製以下的這些檔案吧。 完整檔案

1namespace ConsoleApplication2 2…{ 3 ///// <summary> 4 /// Summary description for Class1. 5 /// </summary> 6 class Class1 7 …{ 8 ///// <summary> 9 /// The main entry point for the application. 10 /// </summary> 11 [STAThread] 12 static void Main(string[] args) 13 …{ 14 int i = 0; 15 16 try 17 …{ 18 throw new FileNotFoundException(); 19 } 20 catch(FileNotFoundException e) 21 …{ 22 //FileNotFoundException e 23 } 24 catch(Exception e) 25 …{ 26 //Exception e 27 } 28 finally 29 …{ 30 //finally 31 } 32 } 33 } 34} 35


Buy Me A Coffee

Evan

Attitude is everything