Revision: 65281
Updated Code
at May 9, 2014 07:04 by heathbo
Updated Code
List<string> testList = new List<string>(){"123","456","789","123","456","789","123","456","789","123","456","789","123","456","789"}; Lambda List<string> test = testList.Where(v => v == "123").ToList(); Linq List<string> test = (from x in testList where x == "123" select x).ToList(); foreach (var num in test) { Console.WriteLine(num); } Console.ReadLine(); Results: "123" "123" "123" "123" "123"
Revision: 65280
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 14, 2013 08:36 by heathbo
Initial Code
List<string> testList = new List<string>(){"123","456","789","123","456","789","123","456","789","123","456","789","123","456","789"}; List<string> test = testList.Where(v => v == "123").ToList(); Console.WriteLine(test); Results: A List<string> with 5 "123".
Initial URL
Initial Description
These are statements to pull all the matching values (123) from the List.
Initial Title
Lambda and Linq Statements to pull all matching values from List
Initial Tags
Initial Language
C#