Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Reading Password from Console

Reading Password from Console

Scheduled Pinned Locked Moved C#
questiontutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jarrett Vance
    wrote on last edited by
    #1

    I'm trying to read a password from the Console and I need it to hide what is being typed. I'm using System.ReadLine() but I can't figure out how to hide what is being typed. There must be simple solution but I can't find it. Any ideas?

    L P 2 Replies Last reply
    0
    • J Jarrett Vance

      I'm trying to read a password from the Console and I need it to hide what is being typed. I'm using System.ReadLine() but I can't figure out how to hide what is being typed. There must be simple solution but I can't find it. Any ideas?

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      You will have to look at the Win32 Console API, specifically turning on/off echoing, and will you are there colors are a breeze too :)

      leppie::AllocCPArticle(Generic DFA State Machine for .NET);

      1 Reply Last reply
      0
      • J Jarrett Vance

        I'm trying to read a password from the Console and I need it to hide what is being typed. I'm using System.ReadLine() but I can't figure out how to hide what is being typed. There must be simple solution but I can't find it. Any ideas?

        P Offline
        P Offline
        Paresh Gheewala
        wrote on last edited by
        #3

        may be using Win32 Old API ;) it can be possible !!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups