title: Check if listbox item exist from textbox value
body: <p>Method that checks if listbox item exists:</p>
  
  <pre><code>    private bool ValueAlreadyInListLanguage(object vItem)
      {
          string valueTextBox = TextBoxLanguages.Text;
          string valueListBox = vItem.ToString();
  
          return valueTextBox == valueListBox;
      }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ibT2t.png" alt="enter image description here"></p>
  
  <p><strong>SOLUTION</strong></p>
  
  <pre><code>    private bool ValueAlreadyInListLanguage(object vItem)
      {
          string valueTextBox = TextBoxLanguages.Text.Trim();
          string valueListBox = vItem.ToString();
  
          return valueTextBox.Equals(valueListBox, StringComparison.CurrentCultureIgnoreCase);
      }
  </code></pre>
  
  <p>Now if i save for example "Swedish" to my listbox, i cannot add "swedish" because it already exists.</p>