Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TestRb
- {
- public class Person
- {
- public string Name { get; set; }
- public int Age { get; set; }
- public Address Address { get; set; }
- }
- public class Address
- {
- public string Street { get; set; }
- public string City { get; set; }
- }
- public object Project(Person p)
- {
- return new
- {
- p.Name,
- p.Age,
- p.Address.Street,
- p.Address.City,
- };
- /*
- Instead of specifying maually all the fields, I would like to have
- return new
- {
- p.*,
- p.Address.*,
- };*/
- }
- return p;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement