Alex Rivera | Logout

Populate list from array

Asked 2009-04-01T01:53:25.503
17

if i have an array. can i populate a generic list from that array:

Foo[] fooList . . . (assume populated array)

// This doesn't seem to work
List<Foo> newList = new List<Foo>(fooList);
Edit
Report

1 Answer

9

You are looking for List(t).AddRange Method

answered 2009-04-01T01:57:15.197

Your Answer