A useful tool, a useful tool, a useful tool, a useful tool...

H

Hilton

Hi,

Occasionally I write:

string name;

public string Name
{
get { return this.Name; }
}

when obviously I mean "return this.name". This results in a crash, Stack
Overflow with no stack trace. Is there a tool that can parse the EXE and
print methods that have recursion? It doesn't have to be any more
complicated than that. A nice touch would be for the tool to recognize a
'flag' e.g. a "//## Recursion" comment and show those as bad.

Anyway, just a thought. While a UI version would be cool, a simple command
line would be great (perhaps even better).

Thanks,

Hilton
 
G

Guest

This is part of the reason I use the habit of prefixing member-level
variables - it's a lot more obvious when you have it wrong.

string m_name;

public string Name
{
get { return m_name; }
}
 
D

Daniel Moth

FYI: VB2005 will show you a warning for that (or error if you configure it
as such). I know it doesn't help you, but thought I'd share.

Cheers
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top