Running with Code Like with scissors, only more dangerous

14Jan/080

Another Reason to Avoid Automatic Properties

Another reason to avoid using Automatic 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.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

ERROR: si-captcha.php plugin says GD image support not detected in PHP!

Contact your web host and ask them why GD image support is not enabled for PHP.

ERROR: si-captcha.php plugin says imagepng function not detected in PHP!

Contact your web host and ask them why imagepng function is not enabled for PHP.

No trackbacks yet.