Users Pricing

forum

Home Forums how to Convert Lambda expression to Func<> variable – MindStick

how to Convert Lambda expression to Func<> variable

Anonymous User 3882 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;

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md