Can someone help me how to get the value of the string x
and put it to another class? I want to use the value of string x
in another class.
namespace WindowsFormsApp6
{
public partial class Titles : Form
{
public Titles(string strToDisplay)
{
InitializeComponent();
string x = strToDisplay;
}
private void titleList_SelectedIndexChanged_1(object sender, EventArgs e)
{
// USE X HERE
}
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…