VB.NET generates properties in the release build

Posted by dattebayo on Stack Overflow See other posts from Stack Overflow or by dattebayo
Published on 2010-06-01T08:29:18Z Indexed on 2010/06/01 8:33 UTC
Read the original article Hit count: 215

I have a form and i drag and drop a control in VB.NET.

I have a line say,

private WithEvents radioButton RadioButton

Also, I have a handler like,

private void click(.....) Handles radioButton.Click
{
    ...
}

Now, When I build this is .NET 3.5 in release mode, and see the generated code in reflector tool, the code is something like,

Private Overridable Property radioButton As RadioButton
.
.
.
<AccessedThroughProperty("radioButton")> _
Private _radioButton As RadioButton

Can someone tell me what is going on here? And how do I avoid the generation of new properties and fields?

-datte

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about properties