当前位置: 首页>>代码示例>>C#>>正文


C# Bank.ToString方法代码示例

本文整理汇总了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());
        }
开发者ID:Rostech,项目名称:TelerikAcademyHomeworks,代码行数:21,代码来源:RunBankAccounts.cs

示例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)"));
        }
开发者ID:chkpnt,项目名称:Bankleitzahlen-Tool,代码行数:21,代码来源:ModelsTests.cs

示例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"));
 }
开发者ID:chkpnt,项目名称:Bankleitzahlen-Tool,代码行数:5,代码来源:ModelsTests.cs

示例4: Models_Bank_ToString_Default

 public void Models_Bank_ToString_Default()
 {
     var bank = new Bank();
     Assert.That(bank.ToString(), Is.EqualTo("-------- UNBENANNTE BANK"));
 }
开发者ID:chkpnt,项目名称:Bankleitzahlen-Tool,代码行数:5,代码来源:ModelsTests.cs


注:本文中的Bank.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。