Last active
August 2, 2022 07:45
-
-
Save enisn/45b77430406728388e750aa6572946f2 to your computer and use it in GitHub Desktop.
Challenge #2 - Solution - 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This will work perfectly for nested objects. | |
var template = "Welcome back {Name}. You're logged in from {Profile.Address.Country.Code}. Have a good day."; | |
var user = new User { Name = "John", Address = new Address { Country = new Country { Code = "US" } } }; | |
var message = template.BindObjectProperties(user); | |
Console.WriteLine(message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment