convert string data array to list

Posted by prince23 on Stack Overflow See other posts from Stack Overflow or by prince23
Published on 2010-05-11T11:40:49Z Indexed on 2010/05/11 11:44 UTC
Read the original article Hit count: 267

Filed under:
|

hi,

i have an string data array which contains data like this

5~kiran
2~ram
1~arun
6~rohan

now a method returns an value like string [] data public string [] names() {

return data.Toarray() }

public class Person { public string Name { get; set; } public int Age { get; set; } }

List persons = new List(); string [] names =names();

now i need to copy all the data from an string array to an list and finally bind to grid view

gridview.datasoutrce= persons

how can i do it. is there any built in method to do it

thanks in advance prince

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET