class Person { public string Name { get; set; } public int Age { get; set; } } static void Test() { var person = new Person { Name = "Ben", Age = 30 }; }