Jump to content

Password Shown in special character!!!!

- - - - -

  • Please log in to reply
2 replies to this topic

#1
desireadil

desireadil

    Newbie

  • Members
  • PipPip
  • 17 posts
I am making a program that if user input their username and password. Then the output print in console window like username same as it is whatever the user input their name however the password print like special character(*).
Now, the question is related to password should be print on the console window in special character. What fuction should be user of concept should be used for making this program

Thanks and regards!

#2
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
I'm not sure I understand what you are asking. Are you asking how to make the '*' characters appear as the user is typing their password? If that's what you're asking, you should use the Console.ReadKey(boolean) method, and choose 'true' for the optional intercept key parameter, and then simply output a hard coded '*' after each key read.

Documentation on Console.ReadKey(boolean): Console.ReadKey Method (Boolean) (System)
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#3
desireadil

desireadil

    Newbie

  • Members
  • PipPip
  • 17 posts
Yes, you got it what I want to do. Well I will check the Console.Readkey() method.

Thanks!!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users