Re: C# .Net Tips & Tricks Hi,
This is the easy way to convert a List<T>containing string data (Position types, e.g. Full-time, half-time, project appoint ment etc) to string[].
string[] bar = (string[])foo.ToArray (typeof(string));
Where foo is your List<string>
Ex:
List<string> li =new List<string>();
li.Add("Test");
li.Add("Test1");
li.Add("Test2");
li.Add("Test3");
string[] si = li.ToArray();
Response.Write(si[0]);
Thanks..
S.Balasubramanian.. |