Steven
Steven

Reputation: 4022

How to get line number?

I have developed a plugin to search the references of a method.I want to print out the line numbers where the method is referenced.I search for method going through IMethod class and check for a particular function reference.Now i want to print the line number.How can i do that?Help

Thanks

Upvotes: 1

Views: 293

Answers (1)

AndiDog
AndiDog

Reputation: 70108

Okay so here's the answer from the comment... vote me up ;)

You can use ISourceReference (documentation). It contains the source range, from which you could derive the line number.

Upvotes: 5

Related Questions