本文整理汇总了C#中Bank.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Bank.ToString方法的具体用法?C# Bank.ToString怎么用?C# Bank.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bank
的用法示例。
在下文中一共展示了Bank.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main()
{
Deposite depositeIndividualStanimir = new Deposite(new Individual("Stanimir"), 2003, 5);
Deposite depositeCompanyGeograficNational = new Deposite(new Company("GeograficNational"), 198032, 17);
Loan loanIndividualGerasim = new Loan(new Individual("Gerasim"), 315, 2);
Loan loanCompanyTouristOOD = new Loan(new Company("TouristOOD"), 43707, 9);
Mortgage mortgageIndividualPetkan = new Mortgage(new Individual("Petkan"), 200, 6);
Mortgage mortgageCompanySoftCom = new Mortgage(new Company("SoftCom"), 299387, 19);
Console.WriteLine(new string('-', 80));
Bank alianzBank = new Bank("Alianz");
alianzBank.AddAccount(depositeIndividualStanimir);
alianzBank.AddAccount(depositeCompanyGeograficNational);
alianzBank.AddAccount(loanIndividualGerasim);
alianzBank.AddAccount(loanCompanyTouristOOD);
alianzBank.AddAccount(mortgageIndividualPetkan);
alianzBank.AddAccount(mortgageCompanySoftCom);
Console.WriteLine(alianzBank.ToString());
}
示例2: Models_Bank_ToString_MitAdresse
public void Models_Bank_ToString_MitAdresse()
{
var bank = new Bank { Bankleitzahl = 12345678, Name = "Parkbank", Adresse = new CivicAddress { City = "Entenhausen" } };
Assert.That(bank.ToString(), Is.EqualTo("12345678 Parkbank (Entenhausen)"));
bank = new Bank
{
Bankleitzahl = 12345678,
Name = "Parkbank",
Adresse = new CivicAddress { City = "Entenhausen", PostalCode = "12345" }
};
Assert.That(bank.ToString(), Is.EqualTo("12345678 Parkbank (12345 Entenhausen)"));
bank = new Bank
{
Bankleitzahl = 12345678,
Name = "Parkbank",
Adresse = new CivicAddress { PostalCode = "12345" }
};
Assert.That(bank.ToString(), Is.EqualTo("12345678 Parkbank (12345 ORTSNAME FEHLT)"));
}
示例3: Models_Bank_ToString_OhneAdresse
public void Models_Bank_ToString_OhneAdresse()
{
var bank = new Bank { Bankleitzahl = 12345678, Name = "Parkbank" };
Assert.That(bank.ToString(), Is.EqualTo("12345678 Parkbank"));
}
示例4: Models_Bank_ToString_Default
public void Models_Bank_ToString_Default()
{
var bank = new Bank();
Assert.That(bank.ToString(), Is.EqualTo("-------- UNBENANNTE BANK"));
}