public void TakeAttendance() { at = new AttendanceThread(aSock, end2, cb); Thread t = new Thread(new ThreadStart(at.Run)); t.Start(); }