title: How can I load all dlls from a folder without knowing their names in c# .net?
body: <p>Previously I was using this call to load all cs file that extends from Rule class</p>
  
  <pre><code>var repository = new RuleRepository();
  repository.Load(x =&gt; x.From(typeof(Rule1).Assembly));
  </code></pre>
  
  <p>By calling Load method as shown above all the class files of the same type as Rule1.cs (meaning all files extending from Rule class) get loaded into repository memory.
  Currently I have decided to convert all these .cs files (i.e. Rule1.cs) into dlls and scan the folder containing these dlls. How can I achieve this behavior?
  Currently I am doing something like this</p>
  
  <pre><code>Assembly assembly1 = Assembly.LoadFile(Server.MapPath("Rule1.dll"));
  List&lt;Assembly&gt; asmblyList = new List&lt;Assembly&gt;();
  asmblyList.Add(assembly1);
  repository.Load(x =&gt; x.From(asmblyList));
  </code></pre>
  
  <p>I want to scan all the assemblies of type Rule1.dll from the folder. How can I possibly do it? Any help would be great.</p>