Use the following code:
The above code gets the assemblies that have been loaded into the execution context of the current application domain. We then retrieve the public types in this assembly and select all the attributes. A sample result is as shown below:
Note: The results may not be the same on each machine. This is because we are referring to GetExportedTypes() which returns type visible ‘outside’ the assembly. So if you add new references to the project or by change the access modifiers of the types, you can get different results.