Search code examples
.netvb.netvisual-studiowinformsmodifiers

Why is the modifier set to Friend in Winforms?


When adding a new control to the designer in Winforms, the modifier on the control is set to Friend, but the default modifier is Private (right clicking the property and resetting the modifier).

Does anyone know why?

Is there a setting to set the modifier to default (Private)?


Solution

  • This is just the default which was chosen by the VB.Net IDE team. While I don't know the reason behind the decision my guess is that it was to maintain a compatible design experience with VB6.

    There is no way that I know of to override this value