Re: [問題] 誰能挑戰這程式?

看板C_Sharp (C#)作者 (I'm)時間21年前 (2004/01/09 23:34), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串12/20 (看更多)
※ 引述《multidecoy (站起來!激鋼人!!)》之銘言: : 雖然我是學JAVA的,不過我也想知道... 用 Java(TM) 的恐怕就只能說抱歉了... http://longhorn.msdn.microsoft.com /lhsdk/ref/ns/system/c/console/m/readkey1.aspx -- using System; using System.Text; class a { static void Main() { Console.Write("Input a password: "); StringBuilder sb = new StringBuilder(); while (true) { ConsoleKeyInfo cki = Console.ReadKey(true); if (cki.Key == ConsoleKey.Enter) { Console.WriteLine(); break; } if (cki.Key == ConsoleKey.BackSpace) { if (sb.Length > 0) { Console.Write("\b\0\b"); sb.Length--; } continue; } Console.Write('*'); sb.Append(cki.KeyChar); } Console.WriteLine("Your password is: {0}", sb.ToString()); } } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.94.64

推 210.85.196.13 01/10, , 1F
這意思是要我們等到longhorn上市? 2006?
推 210.85.196.13 01/10, 1F
文章代碼(AID): #__ieENm (C_Sharp)
討論串 (同標題文章)
文章代碼(AID): #__ieENm (C_Sharp)