c# pass method into parameter for logging : <p>I am implementing simple logging, and I would like to do something like below</p>

<pre><code>public int SomeMethod(int x)
{
  Log(SomeMethod,"here is a log entry);
}
</code></pre>

<p>In the Log method, I would like to parse out the class name from the method and print to the log file the method name and class name.</p>

<p>Is it possible to do something that would look as simple as above or something similar?</p>
