JUST DO IT ~

我只想当个程序员

     摘要: (一)DotNet中的版本组成
DotNet中的版本由4个物理号码组成,如图(一)
在程序集里面,我们可以通过加上AssemblyVersion特性来设置它,
如[assembly: AssemblyVersion("2.0.2.11")]
(二) GAC:
计算机范围内的代码缓存,它存储专门安装的程序集,这些程序集由计算机上的许多应用程序共享。在全局程序集缓存中部署的应用程序必须具有强名称,一个程序集如果注册到了GAC里,被其他程序集合引用的时候,将不会拷贝副本到引用的程序目录中。 (本文只讨论注册到GAC中的程序集)  阅读全文
posted @ 2008-09-15 12:14 小高 阅读(611) | 评论 (0)编辑 收藏
     摘要: 外围报盘程序 .net 调用
传递的参数 varchar2 100   阅读全文
posted @ 2008-09-10 10:58 小高 阅读(5739) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2008-09-08 08:03 小高 阅读(641) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2008-09-01 10:44 小高 阅读(194) | 评论 (0)编辑 收藏
     摘要: try{
= () 强转
}catch (){
}


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




  阅读全文
posted @ 2008-08-31 09:27 小高 阅读(1655) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2008-08-30 23:25 小高 阅读(811) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2008-08-29 10:27 小高 阅读(186) | 评论 (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 小高 阅读(215) | 评论 (0)编辑 收藏
     摘要: 没整理  阅读全文
posted @ 2008-08-09 19:39 小高| 编辑 收藏
     摘要:   阅读全文
posted @ 2008-08-03 19:00 小高 阅读(2312) | 评论 (6)编辑 收藏
     摘要: 在脚本中用
SQL> set define off;
是把默认的&绑定变量的功能取消, 可以把'&字符'当成普通字符处理
SQL> set define on;
打开&绑定变量的功能, &后面的字符串当变量使用.
SQL> show define;  阅读全文
posted @ 2008-08-01 14:47 小高 阅读(2709) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2008-07-15 18:42 小高 阅读(477) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2008-06-25 23:20 小高 阅读(1038) | 评论 (0)编辑 收藏
     摘要: 解决 : 程序在中文目录中
换到根目录 下面 路径中没有中文试试.
  阅读全文
posted @ 2008-06-23 19:38 小高 阅读(354) | 评论 (0)编辑 收藏
     摘要:   阅读全文
posted @ 2008-06-21 17:58 小高 阅读(467) | 评论 (0)编辑 收藏
仅列出标题
共20页: First 上一页 12 13 14 15 16 17 18 19 20 下一页 

导航

<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

统计

常用链接

留言簿(3)

随笔分类(352)

收藏夹(19)

关注的blog

手册

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜