c# - Linq - Query a List<string[]> -


How do you make a list & lt; String []> gt; Matching and returning type on their sub-array System.Collections.Generic.IEnumerable & lt; String []> ?

Edit:

I have it:

  string [] report = file. ReadLine (@ ". \ .exports.txtile"). Entechnable (). Where (s => gt; s. StartsWith ("|.")) ToArray () ;. & Lt; String []> Mylist = new list & lt; String []> (); Foreach (string queue in report) {string [] rows = line.Split ('|'); Mylist.Add (rows); }  

and where to get me my index index [5] == "foo"

For the original question:

  list.Where (arrays => any. (Item => item == match))  

For an updated one:

  result = enumerative.Range (0, list.Count-1). Where (i = & gt; list [i] [5] == "foo");  

You really need to see that there are at least 6 items in the array:

  i = & gt; List [I] Langs & gt; 5 & ​​amp; Amp; List [i] [5] == "afu"  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -