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


C# Event.GetEventInfo方法代码示例

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


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

示例1: Main

        static void Main(string[] args)
        {
            Event Event1 = new Event();

            Event1.GetEventInfo();
            Event1.calculateTicketPrice();
            Event1.GetConcessionPrice();
            Event1.GetDiscountedConcessionPrice();
            Event1.GetTotalPrice();

            System.Console.WriteLine("Your total ticket cost is  " + Event1.TicketPrice);
            System.Console.WriteLine("Your total food cost is  " + Event1.FoodPriceTotal);

            System.Console.WriteLine("Your total ticket cost is  " + Event1.TicketPrice);
            System.Console.WriteLine("Your total concession cost is  " + Event1.concessionPrice);
            System.Console.WriteLine("Your total concession cost with the discount is  " + Event1.DiscountedConcessionPrice);
            System.Console.WriteLine("---------------------------------------------------");

            Event Event2 = new Event();

            Event2.GetEventInfo();
            Event2.calculateTicketPrice();
            Event2.GetConcessionPrice();
            Event2.GetDiscountedConcessionPrice();
            Event2.GetTotalPrice();
            System.Console.WriteLine("Your total ticket cost is  " + Event2.TicketPrice);
            System.Console.WriteLine("Your total concession cost is  " + Event2.concessionPrice);
            System.Console.WriteLine("Your total concession cost with the discount is  " + Event2.DiscountedConcessionPrice);

            System.Console.WriteLine("Your total ticket cost is  " + Event2.TicketPrice);
            System.Console.WriteLine("Your total food cost is  " + Event2.FoodPriceTotal);

            System.Console.WriteLine("---------------------------------------------------");

            Event Event3 = new Event();

            Event3.GetEventInfo();
            Event3.calculateTicketPrice();
            Event3.GetConcessionPrice();
            Event3.GetDiscountedConcessionPrice();
            Event3.GetTotalPrice();
            System.Console.WriteLine("Your total ticket cost is  " + Event3.TicketPrice);
            System.Console.WriteLine("Your total concession cost is  " + Event3.concessionPrice);
            System.Console.WriteLine("Your total concession cost with the discount is  " + Event3.DiscountedConcessionPrice);

            System.Console.WriteLine("Your total ticket cost is  " + Event3.TicketPrice);
            System.Console.WriteLine("Your total food cost is  " + Event3.FoodPriceTotal);

            System.Console.WriteLine("---------------------------------------------------");

            Event Event4 = new Event();

            Event4.GetEventInfo();
            Event4.calculateTicketPrice();
            Event4.GetConcessionPrice();
            Event4.GetDiscountedConcessionPrice();
            Event4.GetTotalPrice();
            System.Console.WriteLine("Your total ticket cost is  " + Event4.TicketPrice);
            System.Console.WriteLine("Your total concession cost is  " + Event4.concessionPrice);
            System.Console.WriteLine("Your total concession cost with the discount is  " + Event4.DiscountedConcessionPrice);
            System.Console.WriteLine("---------------------------------------------------");

            System.Console.WriteLine("Total Event Cost for " + Event1.movieGoer + " is  " + Event1.TotalPrice + " .");
            System.Console.WriteLine("Total Event Cost for " + Event2.movieGoer + " is  " + Event2.TotalPrice + " .");
            System.Console.WriteLine("Total Event Cost for " + Event3.movieGoer + " is  " + Event3.TotalPrice + " .");
            System.Console.WriteLine("Total Event Cost for " + Event4.movieGoer + " is  " + Event4.TotalPrice + " .");

            System.Console.WriteLine("Grand Total for ALL MOVIEGOERS IS  " + (Event1.TotalPrice + Event2.TotalPrice+ Event3.TotalPrice+ Event4.TotalPrice) + "  wow!");

            System.Console.ReadKey();
        }
开发者ID:aasante0619,项目名称:Class-IT1050,代码行数:71,代码来源:Program.cs


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