A director of a company may resign as a director of the company by giving a written notice of resignation to the company at its registered office.