Wednesday 15 July 2015

extension methods - C# non-vowel words -


I need an extension method that needs to be returned to non-vowel words. I

  Public stable IEnumerable & lt; T & gt; Misquotation & lt; T & gt; (This IEnumerable & lt; T & gt; Term) {Return word. Any (w = & gt; w.Contains ("aeou")); }  

I got an error in the form of "T", in which the extanesion method is not "included".

If you always deal with strings, then you do not need to use a common method.

  Public stable IEnumerable & lt; String & gt; Non-Wound Words (This IEnumerable & lt; string & gt; word) {char [] Vowel = {'A', 'E', 'I', 'O', 'U'}; Return word Where (w = & gt; w.IndexOfAny (vowel) == -1); }  

No comments:

Post a Comment