0

i have a string type list and i want to store in text file. For sake of this i want that my list is easily convert to string and i will store it to text file then i read the string from file and convert come back to object and can be used easily

here is code :

 List<string> obj_lst = new List<string>();
 List<string> obj_lst_2 = new List<string>();

 obj_lst.Add("Usm");
 obj_lst.Add("Usm");


 string str = obj_lst.ToString();


 Object obj = (Object)str;

 obj_lst_2 = (List<string>)obj;

0 Answers0