
C#
文章平均质量分 78
Amom
这个作者很懒,什么都没留下…
展开
-
C#中的显式接口成员实现(explicit interface member implementation)
在C#中不可以继承多个基类,但是可以实现多个接口。但是当实现的不同接口中拥有相同名称的方法时,我们就必须使用限定的完全名称来在类中实现接口的方法,比如:public interface IMySQL...{string GetConnStr() ...{}}public interface IOracle...{string GetConnStr() ...{}}public class翻译 2006-09-21 07:37:00 · 1985 阅读 · 0 评论 -
C#泛型学习笔记
以下为看李建忠在MSDN上的WebCast而做的笔记 C#泛型及机制 泛型是通过参数化类型来实现在同一份代码上操作不同数据类型的编程范式。 泛型示例:class StackT>...{ private T[] store; private int size; Stack() ...{ store = new T[10]; size原创 2006-09-23 11:38:00 · 1548 阅读 · 0 评论