Share via


StackTraceElement.LineNumber Property

Definition

Returns the line number of the source line containing the execution point represented by this stack trace element.

public int LineNumber { [Android.Runtime.Register("getLineNumber", "()I", "")] get; }
[<get: Android.Runtime.Register("getLineNumber", "()I", "")>]
member this.LineNumber : int

Property Value

the line number of the source line containing the execution point represented by this stack trace element, or a negative number if this information is unavailable.

Attributes

Remarks

Returns the line number of the source line containing the execution point represented by this stack trace element. Generally, this is derived from the LineNumberTable attribute of the relevant class file (as per The Java Virtual Machine Specification, Section 4.7.8).

Java documentation for java.lang.StackTraceElement.getLineNumber().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to