Wednesday, August 14, 2013

[C#] How to get the current Class/Method

1. Current class name:

    this.GetType().Name;


2. Current method name:

    using System.Reflection;
    MethodBase.GetCurrentMethod().Name;

No comments:

Post a Comment