Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to do something when every line of my code runs. for example adding the count of line of code that has been run until now.how can i create that event?
I dont want create profiler !
Posted
Comments
Sergey Alexandrovich Kryukov 3-Jan-15 0:57am    
Not clear at all. Probably you don't understand the very fundamentals of programming. In a built application (assembly), there are no "lines of code".
—SA

1 solution

Can't you declare one variable and increment that after each line?

But your requirement seems weird to me. But you can do what I said above.
 
Share this answer
 
Comments
mohsen.keshavarzi 3-Jan-15 3:56am    
i want this for security of my app.for ex : if someone alterd my assembly the number will be incorrect.i can not do that you said.
There might be other good ways to secure the app. I don't think this is the correct way. Please search how to secure apps and you will find many awesome ways to do this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900