Running with Code

Like scissors, only more dangerous

  Home  |   Contact  |   Syndication    |   Login
  67 Posts | 0 Stories | 84 Comments | 22 Trackbacks

News



Archives

Post Categories

All Terralever

ASP.NET

Misc

Another reason to avoid using Simple Properties:

[Name("Simple Property Example")]
[Browsable(true)]
public string TestProp1
{
    get;
    set;
}

Look at the property in the debugger:

Oh wait, I can't.

I can't even set a breakpoint to let me know when the property is being accessed.  I understand not being able to see the backing store or the value component - they are after all not part of the code.  But you can't even see when they're being hit.

All I have to say is...

STAY AWAY.

posted on Monday, January 14, 2008 2:15 AM