new Test() 會編譯錯誤。public class Test {
public int num;
public Test(int i) { this.num = i + 5; }
static void Main() {
Test t = new Test(10); // 正確
// Test t2 = new Test(); // 錯誤:無無參數建構子
Console.WriteLine(t.num); // 15
}
}