Пример #1
0
        public void ObjectInitializers()
        {
            var myDinner = new Dinner()
            {
                MainCourse = "Tacos",
                Drinks     = "Beer",
                Desert     = "Another Beer"
            };

            //myDinner.MainCourse = "Tacos";
            //myDinner.Drinks = "Beer";
            //myDinner.HasSides = false;
            //myDinner.Desert = "Another Beer";

            Assert.Equal("For Dinner you will have Tacos With Another Beer",
                         myDinner.GetPlan());
        }
 public void MessWithIt(Dinner x)
 {
     x.MainCourse = "McDonalds";
 }
Пример #3
0
 public void MessWithIt(Dinner x)
 {
     x.MainCourse = "Tacos";
 }