日期:2014-05-20  浏览次数:20787 次

C#接口实现问题
在C#一个类从几个接口派生,可以不全实现这些接口的方法吗?代码如下:

相关接口
==================================================================
  //   摘要:
        //           表示可按照索引单独访问的对象的非泛型集合。
        [ComVisible(true)]
        public   interface   IList   :   ICollection,   IEnumerable
        {
                //   摘要:
                //           获取一个值,该值指示   System.Collections.IList   是否具有固定大小。
                //
                //   返回结果:
                //           如果   System.Collections.IList   具有固定大小,则为   true;否则为   false。
                bool   IsFixedSize   {   get;   }
                //
                //   摘要:
                //           获取一个值,该值指示   System.Collections.IList   是否为只读。
                //
                //   返回结果:
                //           如果   System.Collections.IList   为只读,则为   true;否则为   false。
                bool   IsReadOnly   {   get;   }

                //   摘要:
                //           获取或设置指定索引处的元素。
                //
                //   参数:
                //       index:
                //           要获得或设置的元素从零开始的索引。
                //
                //   返回结果:
                //           指定索引处的元素。
                object   this[int   index]   {   get;   set;   }

                //   摘要:
                //           将某项添加到   System.Collections.IList   中。
                //
                //   参数:
                //       value:
                //           要添加到   System.Collections.IList   的   System.Object。
                //
                //   返回结果:
                //           新元素的插入位置。
                int   Add(object   value);