Is there a way to return only the types in a loaded assembly and not have it look for the nested ones so that the error TypeLoadException does not occur?
foreach (var type in _assembly.GetTypes().Where(type => type.IsClass))
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
IsNested property of System.Type might help you to filter those out.
You could also use Mono.Cecil to browse the assemblies if you do not need to load them.