public void GetProperty() { Console.WriteLine(" Properties:"); PropertyInfo[] pi = TypeOfClass.GetProperties(); foreach (PropertyInfo property in pi) { Console.WriteLine(property.Name); } Console.WriteLine(""); }
public Classes(string courseID, DateTime beginDate, DateTime endDate, string className, string building, int roomNumber, TypeOfClass classType = TypeOfClass.Face_to_Face) : this(courseID, beginDate, endDate) { ClassType = classType; F2FClassInfo = new FaceToFace() { ClassName = className, Building = building, RoomNumber = roomNumber }; }
public Classes(string courseID, DateTime beginDate, DateTime endDate, string className, string url, string browser, TypeOfClass classType = TypeOfClass.Online) : this(courseID, beginDate, endDate) { ClassType = classType; OnlineClassInfo = new OnlineClass() { Name = className, URL = url, Browser = browser }; }
public Classes(string courseID, DateTime beginDate, DateTime endDate, TypeOfClass classType = TypeOfClass.Not_Defined) { if (!string.IsNullOrWhiteSpace(courseID)) { if (VerifyCourseFound(courseID)) { ClassCourseID = courseID; } else { Console.WriteLine("Invalid Course ID"); } } BeginDate = beginDate; EndDate = endDate; ClassType = classType; }
public void SetProperties <T>(string propertyName, T propertyValue) { TypeOfClass.GetProperty(propertyName).SetValue(RefOfClass, propertyValue, null); }