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

  • Thread starter Thread starter Hilton
  • Start date Start date
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
 
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; }
}
 
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
 
Back
Top