首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

接口继承有关问题?

2012-04-20 
接口继承问题??[codeC#][/code]我在A解方案中,写了接口如下:C# codeusing Systemusing System.Collectio

接口继承问题??
[code=C#][/code]我在A解方案中,写了接口如下:

C# code
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ComInterface{    interface CommPluginInput    {        void Do();    }    public sealed class CompanyDescAttribute : Attribute    {        public CompanyDescAttribute() { }        public CompanyDescAttribute(string desc)        {        }        private string desc;        public string Desc        {            get { return desc; }            set { desc = value; }        }    }}

在B解决方案中需要继承这个接口
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ComInterface;
namespace plugin
{
  [CompanyDesc(Desc = "C#公司")]
  class CShanp : CommPluginInput //出错提示错误1“ComInterface.CommPluginInput”不可访问,因为它受保护级别限制 {
  public void Do()
  {
  MessageBox.Show("C# ");
  }
  }
}
引用了A方案中生存的ComInterface.dll并把复到了bin\Debug下

求解释,,为什么CShanp类不能继承CommPluginInput接口?

[解决办法]
占坐。表示关注。期待解答。
[解决办法]
C# code
public interface CommPluginInput
[解决办法]
探讨

C# code

public interface CommPluginInput

热点排行