public static string name;
public string Name
{
get { return name; }
set { name = value; }
}
public static int id;
public int Id
{
get { return id; }
set { id = value; }
}
与
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
private int id;
public int Id
{
get { return id; }
set { id = value; }
}
这两者有什么区别?msdn中的解释看不太明白
|