forum

Home / DeveloperSection / Forums / how to Convert Lambda expression to Func<> variable

how to Convert Lambda expression to Func<> variable

Anonymous User 3247 18-Aug-2014

I have code for searching file. And now have Lambda Expression for filtering that.How to convert the Expression to Func<string> variable. Thanks

Code :

Directory.GetFiles(folder, "*" + KeyWord +
"*").Where(f =>formatFile.Contains(f.Split('.').Last().ToLower()));
into variable :
Func<string> Lambda = ?? (f =>formatFile.Contains(f.Split('.').Last().ToLower())) \\ convert the Expression;

c# c# 
Updated on 18-Aug-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By