I want an extension method that needs to return non-vowel words.I designed
public static IEnumerable<T> NonVowelWords<T>(this IEnumerable<T> word)
{
return word.Any(w => w.Contains("aeiou"));
}
I received error as "T" does not contain extanesion method "Contains".
Best Solution
You don't need to use a generic method if you're always dealing with strings.