本帖最后由 grayhoundd 于 2013-01-15 15:21:05 编辑

解决方案 »

  1.   

    本帖最后由 bdmh 于 2013-01-15 15:26:04 编辑
      

  2.   

    楼主的意思是
    configA里的定义一个方法,此方法在外面能看到,但在它的子类configB里看不到,是吗?
      

  3.   

        public class ConfigA { }
        public class ConfigB : ConfigA { }    public class A<T> where T : ConfigA
        {
            protected void _test1(ConfigA configA) { }        public void test2(T config) { }        public void test3<T1>(T1 config) where T1 : ConfigA
            { }
        }    public class B<T> : A<T> where T : ConfigB
        {
            public void test1(ConfigB configB) 
            {}        public void test3<T1>(T1 config) where T1 : ConfigB
            {}
        }我抛砖引玉吧,3种方式
      

  4.   

    继承也有自己的构造函数的,在构造函数的时候base下父类的构造就可以下