static public StaffAction Logged(StaffLoginId sta) { if (_obj == null) { _obj = new StaffAction(sta); } return(_obj); }
static void Main(string[] args) { StaffLoginId sl = new StaffLoginId(); sl.Username = "******"; Staff s = new Staff(); s.Name = "sana"; StaffAction sa = StaffAction.Logged(sl); Console.WriteLine(sa.getUsername()); Console.ReadLine(); }
private StaffAction(StaffLoginId staff) { s = new Staff(); s.Name = staff.Username; }