Home > DeveloperSection > Forums > c# windows forms tab control
john rob

Total Post:108

Posted on    September-24-2013 4:42 AM


 1 Reply(s)
 1058  View(s)
Rate this:

Can any one help me with a code for displaying vowels from a text entered in a textbox and text should be displayed in a lable ..

I used tab control for placing textbox and lable i place textbox in one tab and lable in another..

Ex if the text entered in text box is David

then if i click lable in another tab a msg should be displayed inside the lable Vowels are : a,i

plz help me with the code.

Pravesh Singh

Total Post:412

Posted on    September-24-2013 7:45 AM

Hi John,
you can try this,

public static string ExtractVowels(string text)


    // Note that this won't find upper-case vowels...

    var vowelArray = text.Where(c => "aeiou".Contains(c))


    // Upper-case it if you want, of course.

    return new string(vowelArray);


call this method on Button click


Don't want to miss updates? Please click the below button!

Follow MindStick