public SupportPerson(string firstName, string lastName, DateTime age, float currPay, string ssn, ShiftName shift) : base(firstName, lastName, age, currPay, ssn) { // This property is defined by the SupportPerson class. Shift = shift; }
public static object SpareAddPropConvert(object obj, int id) { if (id == 1) { if (obj is int) { return((ShiftName)obj); } else if (obj is string) { string s = (string)obj; ShiftName value; if (ShiftName.TryParse(s, out value)) { return(value); } } } // Not a valid value return(null); }