Is there any way to read number of line consumed in class or method using reflection or any other assembly.
This is not possible. The best you could do is to inspect the MethodBody for each MethodInfo which
Provides access to the metadata and MSIL for the body of a method.
but lines of code is not something you can get. The number of lines is entirely a source code property and cannot be obtained through reflection.
Does
int x; x = 1; doSomethingWith(x);
count as one, two, or three lines? What about this:
int x;
x = 1;
doSomethingWith(x);
Lines of code is very rarely a useful metric - see, e.g.
"When, if ever, is “number of lines of code” a useful metric?"
As Ira Baxter pointed out, you should probably look at Roslyn.