0

I'm a beginner in this field, and I wanted to know if on c# I can set a password so only if this specific string will be typed the Console.ReadLine function will work. If it is important to know I'm using MS Visual Studio 2017. edit: what I need is that when you type a certain word, in my case ReProgram, and press enter the code will run as usual and if you enter any other word the code won't continue.

  • .. if Console.ReadLine doesn't 'work', how are you going to get the password? Please explain more about what you want to do, ideally with some code. – stuartd Oct 09 '18 at 17:40
  • Are you asking to password protect a console application so that if it doesn't get the correct password from its own Console ReadLine that it will not run? If so is this a front end to a server that will do the validation or are you storing the correct password in the code? – Rodney S. Foley Oct 09 '18 at 17:40
  • Oh I am very sorry @Filburt about that... it was a daniel-a-white. I looked in the wrong place. – Rodney S. Foley Oct 09 '18 at 18:00
  • @daniel-a-white He doesn't appear to be asking about Password MASKING ... and we have open questions requesting more information. I think you pulled the trigger a little too quickly on closing this a a duplicate without waiting for verification on the open questions. – Rodney S. Foley Oct 09 '18 at 18:01
  • @RodneyS.Foley I believe you understood what I wanted. It will be easier for me to store the password in the code itself. hope the edit might help understand what I need better. – Samuel Robinson Oct 09 '18 at 19:03

0 Answers0