Reputation: 614
We need to transfer some method path to another project. Is there any way to get quickly method path?
For example I have a GetForContractInfoList()
that is placed in App.Api.NetFinanceInfoService
namespace. I want to get this path as a string by Right_Click on it:
App.Api.NetFinanceInfoService.GetForContractInfoList()
How can I get this completely?
Upvotes: 1
Views: 2063
Reputation: 3192
var methodInfo = System.Reflection.MethodBase.GetCurrentMethod();
string fullName = methodInfo.DeclaringType.FullName + "." + methodInfo.Name;
Upvotes: 4