I have read several post about how to get Classes using reflection even there are different examples in StackOverflow but none of them is related to this Version of WP or Windows and if you try those codes no of them works. This is the last one that I tried:
string @namespace = "Supernova.Entities";
var types = Assembly.GetExecutingAssembly().GetTypes()
.Where(t => t.IsClass && t.Namespace == @namespace)
.ToList();
types.ForEach(t => Console.WriteLine(t.Name.GetType()));
I hope someone could give me any idea because when I tried something like that VS always tell me: 'System.Reflection.Assembly' does not contain a definition for 'GetExecutingAssembly'. Thanks for your worthy knowledge.
Aucun commentaire:
Enregistrer un commentaire