哪种声明/实例化更好,为什么?
public class MainWindow
{
private Test _test;
public MainWindow()
{
_test = new Test();
}
}
或者
public class MainWindow
{
private Test _test = new Test();
public MainWindow()
{
}
}