2
在Visual Studio中,你可以通過使用一個聲明(按Ctrl + E,R快捷鍵)的encapsulate field重構操作set訪問。包封物的幾個領域在Visual Studio一次2010
是否有可能產生(使用默認設置)幾個領域的一次訪問器?
具有:
private int one;
private int two;
//etc
和生成:
public int One
{
get { return one; }
set { one = value; }
}
public int Two
{
get { return two; }
set { two = value; }
}
//etc
而不選擇每個聲明。