c# - Linq query, select everything from one lists property that starts with a string in another list -
Hello I am new to linq and lambda
I have two lists < Pre> For example, there is a property to move an index I wanted to select everything from the first list I finally got this ... But selecting the folders to select it is only Another example ... I hope I have explained it :) Thanks for your help Do you mean something about this: fl.LocalOpenFiles ... list & lt; String & gt; F. ....
fl.LocalOpenFiles [0]. Path
fl.LocalOpenFiles where
fl.LocalOpenFiles.Path to
list & lt; String & gt;
list & lt; Local OpenFile & gt; Lof = new list & lt; Local OpenFile & gt; (); Lof = fl.LocalOpenFiles.Join (folders, first => first.path, seconds = & gt; second, (first, second) = & gt; first) .list ();
first.Path == second and I can not find a way to get the data that I want This "brand" requirement is anything that is present:
f [& lt; Any & gt;] == fl.LocalOpenFiles [and lieutenant; Any & gt;] path.Substring (0, f [& lt; any & gt;] length)
List & lt; String & gt; F = new list & lt; String & gt; {"Abc", "def"}; & Lt; LocalOpenFile & gt; New Local Openfile ("ABC"), New LocalOfFILE ("ABCC"), New LocalOfFile ("Ebbed"), New LocalOfFile ("DiffxSoldF"),)} // Results // ABC should be. // abcc // defxsldf
list & lt; Local OpenFile & gt; Results = lof.Where (file = & gt; f.Any (prefix = & gt; with file.Path.Starts). List (); < / Html>
Comments
Post a Comment