System.Runtime.CompilerServices.CallerLineNumberAttribute Class

Allows you to obtain the line number in the source file at which the method is called.

See Also: CallerLineNumberAttribute Members


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


You apply the CallerLineNumber 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).


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