CSharp examples for System.Reflection:Assembly
Get All Assemblies In Folder
using System.Reflection; using System.Linq; using System.IO;/*from w w w . j a v a 2 s. c o m*/ using System.Collections.Generic; public class Main{ public static List<Assembly> GetAllAssembliesInFolder(string folderPath, SearchOption searchOption) { var assemblyFiles = Directory .EnumerateFiles(folderPath, "*.*", searchOption) .Where(s => s.EndsWith(".dll") || s.EndsWith(".exe")); return assemblyFiles.Select(Assembly.LoadFile).ToList(); } }