开发者

.NET Framework Assemblies in Reflection

开发者 https://www.devze.com 2023-02-18 01:52 出处:网络
I have a collection of assemblies using reflection.I want to loop through them, but I would like to ignore the .NET framework or ASP.NET framework DLL\'s. Is there an attribute on the assembly that ma

I have a collection of assemblies using reflection. I want to loop through them, but I would like to ignore the .NET framework or ASP.NET framework DLL's. Is there an attribute on the assembly that marks that its from开发者_StackOverflow中文版 the .NET framework? Or any other designation?

I was looking at the name, and if the name of the assembly starts with System, Microsoft, or mscorlib, I am ignoring it. But I was wondering if there is a flag I can use to make this even easier?


Does the "GlobalAssemblyCache" property qualify for your requirement? http://msdn.microsoft.com/en-us/library/system.reflection.assembly.globalassemblycache.aspx

Propably also depends on how you are loading your assemblies collection. If the above mentioned suggestion doesn't work for you, please clarify that.


You might find this answer to a related question useful

0

精彩评论

暂无评论...
验证码 换一张
取 消