C#可以自动在后台为属性创建字段
public int userid { get; set; }
和下面的写法是一样的
private int _userid; public int userid { get { return _userid; } set { _userid = value; } }
原文:http://www.cnblogs.com/fgb-com/p/4891356.html