Send values from one form to another form

后端 未结 19 2487
眼角桃花
眼角桃花 2020-11-21 11:45

I want to pass values between two Forms (c#). How can I do it?

I have two forms: Form1 and Form2.

Form1 contains one button. When I click on that button, Fo

19条回答
  •  清酒与你
    2020-11-21 12:23

    // In form 1
    public static string Username = Me;
    
    // In form 2's load block
    string _UserName = Form1.Username;
    

提交回复
热议问题