Use Caller Info attributes to obtain information about the caller to a method i.e. member name, source code line number and file path of the caller. This information can be used for tracing, debugging, and creating diagnostic tools.
how to use
Apply the attribute System.Runtime.CompilerServices.? to optional parameters for a method. See example below.