Пример #1
0
 public static MoreComplexBook3 GetSampleInstance()
 {
     Author3 auth = new Author3() { Age = 30, Name = "Tom Archer" };
     return new MoreComplexBook3()
     {
         Title = "Inside C#",
         Author = auth,
         Editors = new string[] {"Mark Twain", "Timothy Jones", "Oliver Twist"},
         PublishYear = 2002,
         Price = 30.5
     };
 }
Пример #2
0
        public static MoreComplexBook3 GetSampleInstance()
        {
            var auth = new Author3 {
                Age = 30, Name = "Tom Archer"
            };

            return(new MoreComplexBook3
            {
                Title = "Inside C#",
                Author = auth,
                Editors = new[] { "Mark Twain", "Timothy Jones", "Oliver Twist" },
                PublishYear = 2002,
                Price = 30.5
            });
        }