I have code linq that have check 2 file but error as below.
Please guide me for solve it.
Thank you.
I have code linq that have check 2 file but error as below.
Please guide me for solve it.
Thank you.
Hi @fairymemay
Could you elaborate your conditions and query.
Does anyone have another method that they can recommend?
thank you.
Try putting it all on one line instead of breaking it across multiple lines.
But also, what are you trying to do here? There is probably a simpler way than this black box Linq expression.
reduce the hasMatch Lookup to an 1 time calculated effort
do not miss-use LINQ and respect the Syntax (e.g. return, end function part in your statement)
Use Any instead of Where, as it has a chance to stop for the first match
CA1827: Do not use Count/LongCount when Any can be used (code analysis) - .NET | Microsoft Learn
as the statement is involved within an if/elseif activity, maybe you can share with us the overall goal what is aimed