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 replies to this topic
#1
Posted 30 May 2011 - 10:55 AM
|
|
|
#2
Posted 31 May 2011 - 06:33 AM
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)
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
Posted 31 May 2011 - 06:35 AM
Yes, you got it what I want to do. Well I will check the Console.Readkey() method.
Thanks!!
Thanks!!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









