public override void PrintInfo() { Console.WriteLine("Фамилия вкладчика: {0}", Surname); Console.WriteLine("Дата открытия вклада: {0}", DepositDate.ToShortDateString()); Console.WriteLine("Размер вклада: {0}", DepositAmount); Console.WriteLine("Процент по вкладу: {0}%", DepositInterest); }
public override string PrintInfo() { string s = ""; s += "Фамилия вкладчика: " + Surname + "\n"; s += "Дата открытия вклада: " + DepositDate.ToShortDateString() + "\n"; s += "Размер вклада: " + DepositAmount + "\n"; s += "Процент по вкладу: " + DepositInterest + "%\n"; return(s); }