StringBuilder outSb=newStringBuilder(); StringWriter Sw=new StringWriter(outSb); Console.SetOut(Sw); 输出到控制台的文本 Console.WriteLine(“Console Test!”); //给textBox赋值 textBox1.Text=outSb.ToString();
2023-10-23 18:22:04
StringBuilder outSb=newStringBuilder(); StringWriter Sw=new StringWriter(outSb); Console.SetOut(Sw); 输出到控制台的文本 Console.WriteLine(“Console Test!”); //给textBox赋值 textBox1.Text=outSb.ToString();