Q: Get Line Number and File Information in Code Where code is written in c# I want to get the Line number and File Information and method information using c# code, where exact that provide code is written.
Thanks in advance.
e.g  Lets say i have code in c#
private void method1()
{
  //code lines written here


  // how to get the line,method and class information here for code written in this method1 function  here for logging mechanism.
  //(expected output here :  Function method1 called, line number(actual in file or method) is executed.
}

I want to know that .net providing any API to get that information.I dont want to get that information from method inputs, but e.g lets say line 33 has code of gettting this information then output should : Line 33,executed
