Код: Выделить всё
void Main()
{
S.Compare(n => n.Contains("a"), ["a", "b", "c", "d", "a"]);
}
static class S
{
public static string Compare(Action predicate, params string[] strings)
{
string[] valueContainedArray = new string[30];
for (int i = 0; i < strings.Length; i++)
{
if (predicate(strings[i])) //
Подробнее здесь: [url]https://stackoverflow.com/questions/79453025/cannot-implicitely-convert-type-void-to-bool-on-a-custom-predicate[/url]