c# windows forms tab control

Total Post:108

 1457  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.

  1. Post:412

    Re: c# windows forms tab control

    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


      Modified On Mar-31-2018 01:46:52 AM