📜  C# 以另一种形式显示文本 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:06.387000             🧑  作者: Mango

代码示例1
You could modify the constructor of Form2 like this:

public Form2(string labelText)
{
    InitializeComponent();
    this.labelX1.Text = labelText;
}
then create Form2 passing in the text:

Form2 frm2 = new Form2(this.button1.text);