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


C# Book.ToString方法代码示例

本文整理汇总了C#中Book.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Book.ToString方法的具体用法?C# Book.ToString怎么用?C# Book.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Book的用法示例。


在下文中一共展示了Book.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Main

 static void Main()
 {
     Book readyPlayerOne = new Book("Ready Player One", "Ernest Cline", 16.90);
     Console.WriteLine(readyPlayerOne.ToString());
     GoldenEditionBook fahrenheit = new GoldenEditionBook("Fahrenheit 451", "Ray Bradbury", 11.90);
     Console.WriteLine(fahrenheit.ToString());
 }
开发者ID:krasi070,项目名称:OOP,代码行数:7,代码来源:BookShop.cs

示例2: Main

    static void Main()
    {
        var book = new Book("Pod Igoto", "Vazov", 15.6);
        var goldenBook = new GoldenEditionBook("Bai Ganio", "Konstantinov", 25);

        Console.WriteLine(book.ToString());

        Console.WriteLine(goldenBook.ToString());
    }
开发者ID:msmilkoff,项目名称:OOPHomeworks,代码行数:9,代码来源:Program.cs

示例3: JSONData

 public string JSONData(string id)
 {
     Book knjiga = new Book("Knjiga test", "Desa", 1990, "sloven", "poezi", "dostopno na spletu");
     string ret = "";
     if (id == "DODAJ")
     {
         ret = knjiga.AddNewBook();
     }
     else if (id == "UREDI")
     {
         ret = knjiga.Update("Knjiga test", "Desa", 2000, "sloven", "poezi", "dostopno na spletu");
     }
     else if(id=="IZPIS")
     {
         ret = knjiga.ToString();
     }
     else if(id=="DELETE")
     {
         ret = knjiga.Delete(5);
     }
     return ret;
 }
开发者ID:kkrajnc,项目名称:BookMe,代码行数:22,代码来源:Service1.svc.cs

示例4: JSONData

        public Book JSONData(string id,string naslov, string avtor, string gradivo, string leto, string jezik, string zalozba)
        {
            Book knjiga = new Book(naslov, avtor, leto, jezik, gradivo, zalozba);
            string ret = "";
            if (id == "DODAJ")
            {
                ret = knjiga.AddNewBook();
            }
            else if (id == "UREDI")
            {
                ret = knjiga.Update(naslov, avtor, leto, jezik, gradivo, zalozba);
            }
            else if (id == "IZPIS")
            {
                ret = knjiga.ToString();
            }
            else if (id == "DELETE")
            {
                ret = knjiga.Delete(5);
            }

            return knjiga;
        }
开发者ID:mmmatey,项目名称:BookMe,代码行数:23,代码来源:Service1.svc.cs

示例5: When_displaying_a_book__should_show_the_book_title_as_a_number

        public void When_displaying_a_book__should_show_the_book_title_as_a_number()
        {
            var book = new Book(BookTitle.BookOne);

            Assert.AreEqual("1", book.ToString());
        }
开发者ID:pseale,项目名称:kata-potter-object-calisthenics-in-csharp,代码行数:6,代码来源:BookTests.cs

示例6: ShowBook

 // Contravariance means only one method is needed to show all
 //      types of books.
 static void ShowBook(Book b)
 {
     Console.WriteLine(b.ToString());
 }
开发者ID:Meowse,项目名称:student1,代码行数:6,代码来源:Program.cs

示例7: Print

 private static void Print(Book s)
 {
     Console.WriteLine(s.ToString());
 }
开发者ID:yuhusniyarova,项目名称:Book,代码行数:4,代码来源:Library.cs


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