Created
February 18, 2015 01:55
-
-
Save okaram/ad9eab5e4e0bacf83ec1 to your computer and use it in GitHub Desktop.
This file contains 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
void Main() | |
{ | |
Person p=new Person(){Name="Orlando",Age=10}; | |
Console.WriteLine(p.GetType().GetProperties()); | |
Console.WriteLine(p.GetType().GetProperties().Select(x=>x.GetMethod.Invoke(p,null))); | |
} | |
// Define other methods and classes here | |
class Person { | |
public string Name {get; set;} | |
public int Age{get;set;} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment