int SourceLine { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The SourceLine property of the MemberDescription class provides the line number in the source code where this member is defined. This can be useful for debugging or logging purposes, as it allows developers to quickly locate the exact line in the source file where a particular member is declared.

Usage

To access the SourceLine property, you need an instance of the MemberDescription class. This property is read-only and returns an integer representing the line number in the source file.

Example

// Assuming 'memberDescription' is an instance of MemberDescription
int lineNumber = memberDescription.SourceLine;

// Use the line number for logging or debugging
Log.Info($"Member is defined at line: {lineNumber}");