Created
May 7, 2020 20:32
-
-
Save enisn/9f95511ab3670228709fcf81dd445f98 to your computer and use it in GitHub Desktop.
Challenge #2 - Solutiont - 2
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
var type = user.GetType(); // find type at runtime. | |
var property = type.GetProperty("Email"); // Get property info with string name. | |
var value = property.GetValue(user); // Gets Email property value of object which placed at 'user' variable. | |
Console.WriteLine(value); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment