title: Invoking a dll function without a call in the main
body: <p>I want to know how can we call a function that is defined in external static class (dll file) without a call to it in main. </p>
  
  <p>To make things clearer, consider an exe file of which code is not exposed and we cannot do any sort of modifications to it, now I want to test a exe file with certain test cases that are defined in my dll file for which a call to the function must me made within the main() function of the exe file. But as mentioned, I dont have permission to modify the code of exe file. Now how this dll function is invoked at the required pointof execution without a call to it using visual studio.</p>
  
  <p>I want to call a function without adding any line to main function. </p>
  
  <p>To make things clearer ,I just want to add some  example</p>
  
  <pre><code>static class DllClass
  {
     static void dllFunction()
     {
        //some implementation.
     }
  }
  class ThirdParty
  {
    public static void Main()
    {
      //Default implementation that i cannot modify.
      //Invoking my static function at this point without calling.(i.e i cannot call DllClass.dllFunction()) 
      //continuing with default implementation.
    }
  }     
  </code></pre>