I have a simple question for the LINQ experts. I want create a single string based in an Array:
return String.Join(",", (from string val
in arrayValues
select new { value = "%" + val.ToString() + "%" })
.Distinct().ToArray());
This code give an error, but I cannot found the way how fix the issue.
Example; I want to send {"1","2","3","4"} and my expected result should be something like that: "%1%,%2%,%3%,%4%"
Any help will be welcome!