开发者

Grouping application settings

开发者 https://www.devze.com 2023-03-27 12:40 出处:网络
My VB.net application has a lot of application settings, is it possible to group them somehow (other than having a common name)?

My VB.net application has a lot of application settings, is it possible to group them somehow (other than having a common name)?

For example, my application has a lot of winforms each of which needs to save some information about itself. Is it possible to use something like:

   Form1.width = My.Settings.Form1.Width
   Form2.width = My.Settings.Form2.Width 
开发者_如何学C

etc.

Thanks!


You can use a naming convention that will do that (instead of . notation):

Form1.width = My.Settings.Form1Width
Form2.width = My.Settings.Form2Width 
0

精彩评论

暂无评论...
验证码 换一张
取 消