public void GhiFile(ArrayList arrayList) { try { using (StreamWriter streamWriter = new StreamWriter(filepath)) { foreach (DocGia DocGia in arrayList) { streamWriter.WriteLine(DocGia.ToString()); } } } catch (Exception e) { Console.WriteLine(e.Message); } }