The System.Runtime.CompilerServices.CallerFilePathAttribute is allowed on optional parameters when there is a standard implicit conversion (§6.3.1) from string to the parameter’s type.
If a function invocation from a location in source code omits an optional parameter with the CallerFilePathAttribute, then a string literal representing that location's file path is used as an argument to the invocation instead of the default parameter value.
The format of the file path is implementation-dependent.
Note that the file path may be affected by #line directives (§2.5.7).
Do'stlaringiz bilan baham: |