C# A窗口内容显示在B窗口中的方法

HeScripts script = new HeScripts(); //A窗口中实例化B窗口

string okscripts = "test"; //设置字段内容

script.oktess = okscripts; //设置获取的B窗口获取的字段类型(string)写入数据到B窗口

script.ShowDialog();  // 打开并显示B窗口



SrcTextBox.AppendText(oktess); // B窗口显示内容字段信息

你可能感兴趣的:(C#)