Skip to content

Instantly share code, notes, and snippets.

@huobazi
huobazi / gist:1039424
Created June 22, 2011 03:04
Password masking in C# console application
/// <summary>
/// Gets the console secure password.
/// </summary>
/// <returns></returns>
private static SecureString GetConsoleSecurePassword( )
{
SecureString pwd = new SecureString( );
while ( true )
{