title: C# Do-While statement to validate user input
body: <p>I want to create a simple do-while statement that makes sure the user input is either Y or N and if not asks them to input again. If it is Y or N then the app continues. This is what I have so far but my application though it is just stuck in a loop asking the user input. New to C# -- thanks for any help.</p>
  
  <pre><code>    string answer = "";
      do
      {
          //Ask the user if they want to roll the dice
          Console.WriteLine("Would you like to roll the dice (y or n)?");
          //Get the user's response and validate that it is either 'y' or 'n'.
          answer = Console.ReadLine();
      } while (answer != "Y" || answer != "N");
  </code></pre>