JUST DO IT ~

          我只想當個程序員

               摘要: (一)DotNet中的版本組成
          DotNet中的版本由4個物理號碼組成,如圖(一)
          在程序集里面,我們可以通過加上AssemblyVersion特性來設置它,
          如[assembly: AssemblyVersion("2.0.2.11")]
          (二) GAC:
          計算機范圍內的代碼緩存,它存儲專門安裝的程序集,這些程序集由計算機上的許多應用程序共享。在全局程序集緩存中部署的應用程序必須具有強名稱,一個程序集如果注冊到了GAC里,被其他程序集合引用的時候,將不會拷貝副本到引用的程序目錄中。 (本文只討論注冊到GAC中的程序集)  閱讀全文
          posted @ 2008-09-15 12:14 小高 閱讀(637) | 評論 (0)編輯 收藏
               摘要: 外圍報盤程序 .net 調用
          傳遞的參數 varchar2 100   閱讀全文
          posted @ 2008-09-10 10:58 小高 閱讀(5778) | 評論 (0)編輯 收藏
               摘要:   閱讀全文
          posted @ 2008-09-08 08:03 小高 閱讀(690) | 評論 (0)編輯 收藏
               摘要:   閱讀全文
          posted @ 2008-09-01 10:44 小高 閱讀(230) | 評論 (0)編輯 收藏
               摘要: try{
          = () 強轉
          }catch (){
          }


          string s = someObject as string;
          if (s != null)
          {
          // someObject is a string.
          }




            閱讀全文
          posted @ 2008-08-31 09:27 小高 閱讀(1690) | 評論 (0)編輯 收藏
               摘要:   閱讀全文
          posted @ 2008-08-30 23:25 小高 閱讀(834) | 評論 (0)編輯 收藏
               摘要:   閱讀全文
          posted @ 2008-08-29 10:27 小高 閱讀(198) | 評論 (0)編輯 收藏

          摘 :  http://hacker.cnblogs.com/archive/2004/08/10/31774.aspx

          對virtual的說明是對的:(它一般用在基類中,子類中用override)
          1.無virtual時,編譯期就確定方法的類型了。也即:無法實現多態了。
          2.有vitual時,方法在運行時確定類型。可以實現多態,只要子類override基類的vitual方法。(也就是樓主的第2點)。

          實現java  動態調用 

           
          另外取個方法 與原來無關.


          對于new沒有說清楚:
          new與virtual并沒有必然的聯系。從字面上看,new聲明的方法是一個“新”方法,與基類完全沒有關系(雖然不幸與基類的某個方法同名同參)。也即:通過向上轉型(如:基類 引用名=new 子類())得到的引用將無法看到子類中new出來的方法。所以會出現樓主第3點中的結果。

           

           







          using System; 

          public class ClassFather 



          public string s1; 

          // virtual public void VirFun() 

          public void VirFun() 

          { Console.WriteLine( 
          "base  classfather virFun:"+ s1 );} 




          public class ClassBoy : ClassFather 



          public new void VirFun() 

          base.VirFun();} 




          public class ClassGirl : ClassFather 



          public new void VirFun() 



          base.VirFun(); 

          Console.WriteLine( s1 ); 






          public class Test 



          public static void Main() 



          ClassFather a 
          = new ClassFather(); 

          a.s1 
          = "father"

          a.VirFun(); 


          ClassFather b 
          = new ClassBoy(); 

          b.s1 
          = "boy"

          b.VirFun(); 


          ClassFather c 
          = new ClassGirl(); 

          c.s1 
          = "girl"

          c.VirFun(); 








          using System; 


          public class ClassFather 



          public string s1; 

          virtual public void VirFun() 

          { Console.WriteLine( "ClassFather  virfun()(: "+ s1 );} 

          }
           


          public class ClassBoy : ClassFather 



          public override void VirFun() 

          {
          Console.WriteLine( 
          "ClassBoy  virfun() : "+ s1 );   // base.VirFun();} 

          }
           


          public class ClassGirl : ClassFather 



          public new void VirFun() 



          //base.VirFun(); 

          //Console.WriteLine( s1 ); 

           Console.WriteLine( 
          "ClassGirl new  virfun() : "+ s1 );

          }
           

          }
           


          public class Test 



          public static void Main() 



          ClassFather a 
          = new ClassFather(); 

          a.s1 
          = "father"

          a.VirFun(); 


          ClassFather b 
          = new ClassBoy(); 

          b.s1 
          = "boy"

          b.VirFun(); 


          ClassFather c 
          = new ClassGirl(); 

          c.s1 
          = "girl"

          c.VirFun(); 

          }
           

          }



          posted @ 2008-08-29 08:26 小高 閱讀(242) | 評論 (0)編輯 收藏
               摘要: 沒整理  閱讀全文
          posted @ 2008-08-09 19:39 小高| 編輯 收藏
               摘要:   閱讀全文
          posted @ 2008-08-03 19:00 小高 閱讀(2329) | 評論 (6)編輯 收藏
               摘要: 在腳本中用
          SQL> set define off;
          是把默認的&綁定變量的功能取消, 可以把'&字符'當成普通字符處理
          SQL> set define on;
          打開&綁定變量的功能, &后面的字符串當變量使用.
          SQL> show define;  閱讀全文
          posted @ 2008-08-01 14:47 小高 閱讀(2730) | 評論 (0)編輯 收藏
               摘要:   閱讀全文
          posted @ 2008-07-15 18:42 小高 閱讀(513) | 評論 (0)編輯 收藏
               摘要:   閱讀全文
          posted @ 2008-06-25 23:20 小高 閱讀(1066) | 評論 (0)編輯 收藏
               摘要: 解決 : 程序在中文目錄中
          換到根目錄 下面 路徑中沒有中文試試.
            閱讀全文
          posted @ 2008-06-23 19:38 小高 閱讀(381) | 評論 (0)編輯 收藏
               摘要:   閱讀全文
          posted @ 2008-06-21 17:58 小高 閱讀(493) | 評論 (0)編輯 收藏
          僅列出標題
          共20頁: First 上一頁 12 13 14 15 16 17 18 19 20 下一頁 

          導航

          <2025年8月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          統計

          常用鏈接

          留言簿(3)

          隨筆分類(352)

          收藏夾(19)

          關注的blog

          手冊

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 沁源县| 海盐县| 克拉玛依市| 溆浦县| 井陉县| 中西区| 白水县| 玉屏| 贡觉县| 溧阳市| 夏河县| 莱芜市| 桃园县| 株洲县| 敖汉旗| 鹤峰县| 台中县| 乐业县| 唐海县| 喀喇沁旗| 肃宁县| 祁门县| 中牟县| 双峰县| 屯留县| 康马县| 易门县| 永城市| 宜阳县| 渑池县| 济南市| 博兴县| 乌拉特中旗| 远安县| 德保县| 洪洞县| 长宁县| 嘉祥县| 襄樊市| 乐至县| 丹巴县|