append couple of strings into to string []

  • Thread starter Thread starter juli
  • Start date Start date
J

juli

How to append a couple of strings into a string[] in a loop? Thanks a
lot && good evening:)
 
Try using an arraylist

e.g:

ArrayList al = new ArrayList();

al.Add("string1");

al.Add("string2");

al.Add("string3");

al.Add("string4");

al.Add("string5");

string[] mystrings = (string[])al.ToArray(typeof(string));


Ciaran
 
Back
Top