Another alternative is to use
Regex.Replace
method as shown below
string sentence = @"sentence with vowels and consonants";
sentence = Regex.Replace(sentence,@"[aeiou]","*",
RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Console.WriteLine (sentence);
[Edit] Modified to include only consonants in the output [/Edit]
string sentence = @"!sentence with vowels and consonant?";
string onlyConsonants = Regex.Replace(sentence,
@".*?([ a-z-[aeiou]])|.*?$", "$1",
RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Console.WriteLine (onlyConsonants);