Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

linq convert list to another list

List<objA> listA = GetObjAList();

List<objB> listB = objA.Select(oA => new objB()
	{
		prop1 = oA.prop1,
		nextProp = oA.someProp
	}).ToList();
 
PREVIOUS NEXT
Tagged: #linq #convert #list #list
ADD COMMENT
Topic
Name
8+5 =