title: C# get position of a character from string
body: <p>My code is this:</p>
  
  <pre><code> string dex = "ABCD1234";
   string ch = "C";
   string ch1, ch2;
      if (dex.Contains(ch))
      {
         string n = Convert.ToChar(dex);
         MessageBox.Show(ch + "  is on " + n + " place and is between " + ch1 + " and " + ch2);
      }
  </code></pre>
  
  <p>I wanted to convert the string into array but i can't do it and i can't retrieve the position of the 'ch' string and what's between it.</p>
  
  <p>The output should be:</p>
  
  <pre><code>MessageBox.Show("C is on 3rd place and is between B and D");
  </code></pre>