Is there a way to grab the function name and file name when I'm inside a function? I'm trying to add log files all over the place like so, and want to be able to just copy and paster my logfile line of code in certain functions:
public class NewCorrGenerator
{
public void Start()
{
bool rc = true;
myLogFile.InfoToFileWithTime("NewCorrGenerator - Start", appContext);
etc.....
}
}
As you can see is there a way to grab the class name and function name in a string and output it to myLogFile function?