[求助]两个接口定义的方法重名但是 返回值类型不同,若在同一个类中继承,如何处理
两个接口定义的方法重名但是 返回值类型不同,若在同一个类中继承,如何处理? public interface ITrans
{
double Deposit(double b);
}
public interface IBank
{
void Deposit(double b);
}
public class Account : ITrans, IBank
{
double balance;
public Account(double b)
{
balance = b;
}
public double Deposit(double b)
{
balance += b;
return balance;
}
//public void Deposit(double b)
//{
// balance += 100.0;
//}
}
class MapDemo
{
static void Main(string[] args)
{
Account acct = new Account(500.0);
Console.WriteLine("balance is {0}",acct.Deposit(100));
}
}