可以在函数体内实例吗?
private static void Method(Form1 f)
{
f.listBox.Item.Add(...);
}
private static void Method()
{
Form1 f=new Form1();
f.listBox.Item.Add(...);
}
都行吗?
private static void Method(Form1 f)
{
f.listBox.Item.Add(...);
}
private static void Method()
{
Form1 f=new Form1();
f.listBox.Item.Add(...);
}
都行吗?
private static void Method(Form1 f)
{
f.listBox.Item.Add(...);
}
才可以!