interface IprogramDic
{
string Language
{
get;
set;
}
string Version
{
get;
set;
}
void ShowInfo();
}
class Program
{
string language = "";
string version = "";
public string Language
{
get { return language; }
set { language = value; }
}
public string Version
{
get { return version; }
set { version = value; }
}
public void ShouInfo()
{
Console.WriteLine("语言/t版本");
Console.WriteLine(Language + "/t" + Version);
}
static void Main(string[] args)
{
Program program = new Program();
IprogramDic iprogramDic=program;
iprogramDic.Language = "C#编程词典";
iprogramDic.Version = "2010版";
iprogramDic.ShowInfo();
}
}错误 1 无法将类型“接口继承.Program”隐式转换为“接口继承.IprogramDic”。存在一个显式转换(是否缺少强制转换?)
------解决思路----------------------
看到了IprogramDic 定义,却没看到Program定义,你这个Program是什么东西?
------解决思路----------------------
class Program:IprogramDic
{