title: Trying to fix reading from file C#
body: <p>I have made a small console application, works fine other than when I enter a pin, will include some code soon, I can enter part of it and it will still log me in, I do not want it to do this, I need the pin to be exact to log in.</p>
  
  <p>Full code can be accessed here: <a href="https://pastebin.com/ARX1MqLc" rel="nofollow noreferrer">https://pastebin.com/ARX1MqLc</a></p>
  
  <pre><code>Console.WriteLine("Please insert your credit card by pressing 'Enter'.");
  Console.ReadKey();
  Console.Write("Please enter your 4-digit PIN: ");
  pin = Console.ReadLine();
  bool pinVerif = File.ReadAllText("C:/Users/ryanj/OneDrive/Documents/Random code/myApp/pin.txt").Contains(pin);
  if(pinVerif == true)
  {
      verified();
  }
  else
  {
      Console.WriteLine("Sorry your PIN was incorrect, please try again or exit the program.");
      menu();
  }
  </code></pre>
  
  <p>I did create a file that is called pin.txt, so you will need to create that and put anything in it, but I honestly don't know whats wrong with it.</p>