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


C# Invoice.GetInvoiceAmount方法代码示例

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


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

示例1: Print

 // Prints the result
 private static void Print(Invoice i)
 {
     Console.WriteLine("Part Number:\t{0}", i.PartNumber);
     Console.WriteLine("Descritpion:\t{0}", i.Description);
     Console.WriteLine("Quantity:\t{0}", i.Quantity);
     Console.WriteLine("Price:\t\t{0}", i.Price);
     Console.WriteLine("Invoice amount:\t{0}\n", i.GetInvoiceAmount());
 }
开发者ID:Termininja,项目名称:CityCollegesOfChicago,代码行数:9,代码来源:InvoiceTest.cs

示例2: Main

 // Entry point to the application
 public static void Main(string[] args)
 {
     // Intialize the invoice
     Invoice invoice1 = new Invoice("1234", 50, 9.89M, "Sheetrock 4ft x 8ft");
     Console.WriteLine("Part Number: {0}", invoice1.PartNumber);  // Print part number
     Console.WriteLine("Quantity: {0}", invoice1.Quantity);  // Print quanity
     Console.WriteLine("Price Per Item: {0:C}", invoice1.PricePerItem);  // Print price per item
     Console.WriteLine("Description: {0}", invoice1.Description);  // Print description
     Console.WriteLine("Invoice Amount: {0:C}", invoice1.GetInvoiceAmount());   // Print the invoice amount total
 }
开发者ID:amynpeterson,项目名称:COP2360AmyPeterson,代码行数:11,代码来源:InvoiceTest.cs

示例3: Main

        static void Main(string[] args)
        {
            string partDescription = "item";
            string partNumber = "101";
            decimal pricePerItem = 2.5M;
            int quantity = 5;

            Invoice invoice = new Invoice(partDescription, partNumber, pricePerItem, quantity);
            Console.WriteLine(invoice.GetInvoiceAmount());            
        }
开发者ID:arr13,项目名称:OOP-CSharp.NET,代码行数:10,代码来源:Program.cs


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