using System;
using System.Runtime.CompilerServices;
class Program
{
public static void Log( [CallerFilePath] string filePath = "",
[CallerLineNumber] int lineNumber = 0) {
Console.WriteLine("filePath: " + filePath);
Console.WriteLine("lineNumber: " + lineNumber);
}
static void Main() {
Log();
}
}
/*
run:
filePath: /tmp/example.cs
lineNumber: 14
*/