Best practice for sharing variables across forms in VB.NET

后端 未结 6 1508
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-07 05:56

I need to share variables across two forms in VB.NET. One of them is the main form and the other is a child form.

I have been searching, and I have found a few metho

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-07 06:23

    You can add public properties to either form. They can access those properties from each other. (That is not called shared though, and is not static in most cases.)

提交回复
热议问题