How to get the line number of source code?

UncleRonin

Well-known member
Joined
Feb 28, 2006
Messages
230
Location
South Africa
Programming Experience
5-10
In C++ and those languages you can get the preprocessor to output the current line number in source code using something like __LINE__. Is there an equivalent in VB.NET?
 
You can get the line number from StackFrame of StackTrace. Line number can only be retrieved while debugging.
 
Back
Top