title: Number of occurrences of a character in a string and their positions
body: <pre><code>Console.WriteLine("Insert the character you are searching for: ");
  CharacterSearch = Console.ReadLine();
  var count = file.Where(x =&gt; x == CharacterSearch).Count();
  </code></pre>
  
  <p>So what I am trying to do is to read text from the variable <code>file</code> and then search for a specific character in the string that is entered from the keyboard. So the searched character would be <code>CharacterSearch</code>.</p>
  
  <p>I also want to check for their positions not just the number of occurrences.</p>