3、定义ClassInfo类(课程类),用CodeSmith生成 public class ClassInfo { Member Variables#region Member Variables protected string _loginDate; protected string _logoutDate; protected string _registerDate; protected string _useMin; protected string _className; protected string _classType; protected string _percent; //protected string _nouse; #endregion Constructors#region Constructors public ClassInfo() { } public ClassInfo(string loginDate, string logoutDate, string registerDate, string useMin, string className, string classType, string percent) { this._loginDate = loginDate; this._logoutDate = logoutDate; this._registerDate = registerDate; this._useMin = useMin; this._className = className; this._classType = classType; this._percent = percent; } #endregion Public Properties#region Public Properties // public string NoUse // { // get{return _nouse;} // set{ _nouse= value;} // } public string LoginDate { get { return _loginDate; } set { _loginDate = value; } } public string LogoutDate { get { return _logoutDate; } set { _logoutDate = value; } } public string RegisterDate { get { return _registerDate; } set { _registerDate = value; } } public string UseMin { get { return _useMin; } set { _useMin = value; } } public string ClassName { get { return _className; } set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Invalid value for ClassName", value, value.ToString()); _className = value; } } public string ClassType { get { return _classType; } set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Invalid value for ClassType", value, value.ToString()); _classType = value; } } public string Percent { get { return _percent; } set { if (value != null && value.Length > 50) throw new ArgumentOutOfRangeException("Invalid value for Percent", value, value.ToString()); _percent = value; } } #endregion }
(编辑:焦作站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|