title: How slow is Reflection
body: <p>I recently created an interface layer to distinguish the DataAccessProvider from our Business logic layer.
  With this approach we can change our choice of DataAccessProvider whenever we want by changing the values in the Web/App.Config.
  (more details can be given if needed).</p>
  
  <p>Anyway, to do this we use reflection to accomplish our DataProvider class on which we can work.</p>
  
  <pre><code>/// &lt;summary&gt;
  /// The constructor will create a new provider with the use of reflection.
  /// If the assembly could not be loaded an AssemblyNotFoundException will be thrown.
  /// &lt;/summary&gt;
  public DataAccessProviderFactory()
  {
      string providerName = ConfigurationManager.AppSettings["DataProvider"];
      string providerFactoryName = ConfigurationManager.AppSettings["DataProviderFactory"];
      try
      {
          activeProvider = Assembly.Load(providerName);
          activeDataProviderFactory = (IDataProviderFactory)activeProvider.CreateInstance(providerFactoryName);
      }
      catch
      {
          throw new AssemblyNotFoundException();
      }
  }
  </code></pre>
  
  <p>But now I'm wondering how slow reflection is?</p>