title: How do I count vowels in a string C#
body: <p>I am working on a program that is designed to count the vowels in a word, however I am having trouble counting the vowels per word. My current code looks like this: </p>
  
  <pre><code>    string word;
      string[] ca = { "a", "e", "i", "o", "u", "A", "E", "I", "O", "U" };
      int va = 0;
      public Form1()
      {
          InitializeComponent();
      }
  
      private void button1_Click(object sender, EventArgs e)
      {
  
          if (ca.Contains(word))
          {
  
              label1.Text = "Vowel Count: " + va;
          }
          else
          {
              label1.Text = "Vowel Count: " + va;
          }
      }
  </code></pre>
  
  <p>Thanks for the help!</p>