System.Runtime.CompilerServices.CallerFilePathAttribute Class

Allows you to obtain the full path of the source file that contains the caller. This is the file path at the time of compile.

See Also: CallerFilePathAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Parameter, Inherited=false)]
public sealed class CallerFilePathAttribute : Attribute

Remarks

You apply the CallerFilePath attribute to an optional parameter that has a default value. You must specify an explicit default value for the optional parameter. You can't apply this attribute to parameters that aren't specified as optional.

For more information, see Caller Information (C# and Visual Basic).

Requirements

Namespace: System.Runtime.CompilerServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0