C# Pass Class as parameter to method and call static method in there
<p>I am new to C# and looking the best way to do the following implementation.</p>

<p>My project got several Model classes (like 25) and each class got a static method called "process()", which just takes a bit of time to finish it's task.</p>

<p>I need to call all these method in each class one after another and to add some logs (write status of method execution in to file) to track execution. </p>

<p>I can simply do the following, But surely there should be a better professional way to do this</p>

<pre><code>Log.WriteLog(DateTime.Now + " Class A Process Started");
ClassA.Process()
Log.WriteLog(DateTime.Now + " Class A Process Finished");
Log.WriteLog(DateTime.Now + " Class B Process Started");
ClassB.Process()
Log.WriteLog(DateTime.Now + " Class B Process Finished");
............ continue 25 classes
</code></pre>

<p>What I am trying to do is to write a method and just Add Logs and repetitive work in there..</p>

<pre><code>private void CommonMethod(Class)
{
   Check what class
   Add Process started Log
   Call Process method
   Add proicess finished Log
}
</code></pre>