读书人

接口继承有关问题?

发布时间: 2012-04-20 15:27:03 作者: rapoo

接口继承问题??
[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

读书人网 >asp.net

热点推荐