__LINE__ and __PATH__ function.

  • Thread starter Thread starter Sky
  • Start date Start date
S

Sky

In PHP there is a way of finding your current location in the file structure
with the __LINE__ and __PATH__ special commands.

Comes in handy for debugging, as well as relative pathing when making
websites.

I assume that being compiled __LINE__ makes no sense in C# asp.net, but
__PATH__ still would. Is there such a beast?

Thanks!
 
Ok. Sounds good. But the StackFrame class provides strings of the Functions
and Classes I am in, not the path.

I'm thinking more in line of if within an "\Controls\control.ascx" that I
can find out that I am in the Controls dir so that I can decide how many
"..\" to prepend to it to nav to where I want to go.

PS: Yes, I know about the "~" directive for the root dir -- just want to
know if there is another way.

Thanks!
 
Back
Top