473,385 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

console hiding input characters

Hi,

how do I prevent characters from being displayed in the Console when reading them using Console.ReadLine(), e.g. when entering a password.

This without using API-functions 'cause I want it to be a portable solution.

Is there a .NET-way to do it ?

thnx
Chris

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Nov 16 '05 #1
1 1280
Perhpas, this can help:
http://blogs.madtechnology.net/chris...12/11/306.aspx

"Chris C" <cm****@yahoo.com> wrote in message
news:u9**************@TK2MSFTNGP15.phx.gbl...
Hi,

how do I prevent characters from being displayed in the Console when reading
them using Console.ReadLine(), e.g. when entering a password.

This without using API-functions 'cause I want it to be a portable solution.

Is there a .NET-way to do it ?

thnx
Chris

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Dave | last post by:
Hi, I have done some research, trying to Clear The Screen in java code. The first option was the obv: system.out.print("\n\n\n\n\n\n\n\n\n\n\n\n"); then i heard about this method:...
43
by: Dom | last post by:
can someone please help me display text in the console cout << "Testing"; in a different colour to the default one
4
by: Derek Strickland | last post by:
Hello world I have a console application that loads several classes. I would like on of my classes to be able to detect input made in the console and take action based on the input. Sounds...
1
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
1
by: rozrabiak | last post by:
Hello! How can I get key code in console program? Eg. When I press ENTER then he show me code 13, when CTRL then code of CTRL key, ALT... In C# Helpis only one example, but they not detect CTRL,...
4
by: Henry | last post by:
for the following code snippet: int k; char c; while (true) { k = Console.Read (); if (k == -1) break; c = (char) k; Console.WriteLine ("Echo: {0}", c);
5
by: Hooyoo | last post by:
Hi, here. I write following codes: string password = Console.ReadLine(); I want users enter their passwords, but readline will show content of password when entering, so is there any way to...
2
by: wizofaus | last post by:
Hi, If I write the following unmanaged C program: main() { char buffer; gets(buffer); }
2
by: Patrick Hill | last post by:
Hi, I have a console application that takes command line arguments. Now it seems my program fails if the total number of characters of the input parameters is greater then 102 anyone know why and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.