public interface IDoSomething
{
void Test();
}
public interface IOther
{
string Test();
} /// <summary>
///Class1 的摘要说明
/// </summary>
public class Class1 : IDoSomething, IOther
{
public Class1()
{
//
//TODO: 在此处添加构造函数逻辑
//
}
public void Test()
{
throw new NotImplementedException("IDoSomething");
} string IOther.Test()
{
return "IOther";
} } string IOther.Test()
{
return "IOther";
}
这里解决了命名冲突,但是客户端怎么用这个函数啊?
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Class1 c = new Class1();
Response.Write(IOther.Test());
}
}
{
void Test();
}
public interface IOther
{
string Test();
} /// <summary>
///Class1 的摘要说明
/// </summary>
public class Class1 : IDoSomething, IOther
{
public Class1()
{
//
//TODO: 在此处添加构造函数逻辑
//
}
public void Test()
{
throw new NotImplementedException("IDoSomething");
} string IOther.Test()
{
return "IOther";
} } string IOther.Test()
{
return "IOther";
}
这里解决了命名冲突,但是客户端怎么用这个函数啊?
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Class1 c = new Class1();
Response.Write(IOther.Test());
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货