2012-01-24 10 views

回答

5

您可以在構造函數初始化Enabledtrue

public class Foo 
{ 
    public Foo() 
    { 
     Enabled = true; 
    } 

    public bool Enabled { get; set; } 
} 

Disabled列必須一個一個空列。因此它的默認值爲null。

相關問題