问题
Is it possible to set a project default for VB.NET winforms projects so that the default Modifier for controls added to winforms is Private (not Friend)?
I know there's a "modifiers" property in the properties window so I can set it for each individual control... however I would like to change the project so from now on myself and other developers have to specifically decide to change from private. (Which I would strongly discourage them from doing).
I believe there is no way of doing this, but on another forum a while ago someone mentioned it would be possible with an add-in (but didn't name the add-in or where to get it).
回答1:
It could be possible to build an addin to do this. C# or VB.NET
Once you have an Addin structure set in place you can do it on a button click (create a new button for them) or try and play it off of an add item event. I am still looking to see if I can find an event for you.
来源:https://stackoverflow.com/questions/2800618/set-a-project-default-for-vb-net-projects-so-that-the-default-modifiers-property