我创建了一个文本框,想要在静态方法中引用它.我怎样才能做到这一点?在这里;我的代码
private void Form1_Load(object sender, EventArgs e)
{
TextBox textbox2 = new TextBox();
textbox2.Text = "A";
}
static void gettext()
{
textbox2.Text = "B"; //here is my problem
}
Run Code Online (Sandbox Code Playgroud) 在c#中,如何找到字符串中的特定字符。这个“2222+2222”是我的字符串,我想在其中找到字符“+”?我想要一个如果找到则返回 bool 的函数。