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