Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

create list of strings from field of list of object c#

//ConvertAll - Converts the elements in the current List to another
//type, and returns a list containing the converted elements
List<string> ls = sampleList.ConvertAll(item => item.IneedThis)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #list #strings #field #list #object
ADD COMMENT
Topic
Name
6+7 =