interface IIfic1
{
void PrintoUT(string s);
}
class MyClass:IIfic1
{
public void PrintOut(string s)
{
Console .WriteLine("Calling through: {0}",s);
}
}
class Program
{
static void Main(string[] args)
{
MyClass mc = new MyClass();
mc.PrintOut("1");
}
}
}
public void PrintOut(string s)
->
public void PrintoUT(string s)
。。。接口里面的是 PrintoUT 然后类里面是PrintOut(string s) 不一样啊..所以说你没有实现接口成员
是啊,接口名字要区分大小写的。
实现接口成员大小写区分