Using and instance of a class on two forms

前端 未结 3 1210
野的像风
野的像风 2021-01-23 21:24

I am struggling to get my head around the following. I current have three forms, my main and one main class.

public partial class frmMain : Form
{
    public frm         


        
3条回答
  •  故里飘歌
    2021-01-23 22:03

    You need to pass it to the other forms as a constructor parameter, then store it in a private field.

提交回复
热议问题