问题描述
stringm1="nTypeastringoftextthenpressEnter."+"Type'+'anywhereinthetexttoquit:n";stringm2="Character'{0}'ishexadecimal0x{1:x4}.";stringm3="Characterishexadecimal0x{0:x4}.";charch;intx;//Console.WriteLine(m1);do{x=Console.Read();try{ch=Convert.ToChar(x);if(Char.IsWhiteSpace(ch)){Console.WriteLine(m3,x);if(ch==0x0a)Console.WriteLine(m1);}elseConsole.WriteLine(m2,ch,x);}catch(OverflowExceptione){Console.WriteLine("{0}Valueread={1}.",e.Message,x);ch=Char.MinValue;Console.WriteLine(m1);}}while(ch!='+');谁帮忙注释下这些代码吖跪求
时间: 2024-10-27 18:26:06