Source/NFX/IO/ConsoleUtils.cs
/// <summary>
/// Reads password from console displaying substitute characters instead of real ones
/// </summary>
Reads password from console displaying substitute characters instead of real ones
Reads password from console displaying substitute characters instead of real ones
public static string ReadPassword(char substitute)
    {
      string buff = string.Empty;
      while (true)
      {
        char c = Console.ReadKey(true).KeyChar;
        if (Char.IsControl(c)) return buff;
        buff += c;
        if (substitute != (char)0)
          Console.Write(substitute);
      }
    }
public static string ReadPassword ( char substitute ) { string buff = string . Empty ; while ( true ) { char c = Console . ReadKey ( true ) . KeyChar ; if ( Char . IsControl ( c ) ) return buff ; buff += c ; if ( substitute != ( char ) 0 ) Console . Write ( substitute ) ; } }
Reads password from console displaying substitute characters instead of real ones
Reads password from console displaying substitute characters instead of real ones
substitute
char