在线等待,我只想看到hello2,怎么办?. 请看看我的原代码,怎样清除Console.WriteLine写下的信息? .

fengcxf 2004-01-06 04:41:51
i wanna see the hello2 only

using System;

namespace ConsoleApplication3
{

class Class1
{



[STAThread]
static void Main(string[] args)
{
//
// TODO: Add code to start application here
Console.WriteLine("hello1");
//Console.clear;---->why wrong, how to modify?
Console.WriteLine("hello2");
Console.ReadLine();
}
}
}
...全文
29 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
MichaelSoft 2004-01-06
  • 打赏
  • 举报
回复
你要这个干嘛?好像没什么用。
fengcxf 2004-01-06
  • 打赏
  • 举报
回复
so, which function can i use? and tips?
ktaka 2004-01-06
  • 打赏
  • 举报
回复
I'm very sorry,I think it maybe did not have this function.
Did you try the different function?
caozping 2004-01-06
  • 打赏
  • 举报
回复
你说的Clear方法以C#里就没有。
用这个可能清清除WriteLine()写的字符
    Console.Out .NewLine = "\t";
Console.WriteLine("hello1");
Console.Write("\b\b\b\b\b\b\b\b");//几个\b就清除几个字符
Console.Out .NewLine ="\n\r";
Console.WriteLine("hello2");
Console.ReadLine();
fengcxf 2004-01-06
  • 打赏
  • 举报
回复
why can not clear. but in c++ . we can use the clear!!!!!!!!!!!!!!!!!!!!!!
don't have any solution? HELP
hddhddhdd 2004-01-06
  • 打赏
  • 举报
回复
UP
caozping 2004-01-06
  • 打赏
  • 举报
回复
using System;

namespace ConsoleApplication2
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
class Class1
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: 在此处添加代码以启动应用程序
//
Console.Write("hello1");
//Console.clear;---->why wrong, how to modify?
//WriteLine()写入的不能清除
Console.Write("\b\b\b\b\b\b\b\b");
Console.WriteLine("hello2");
Console.ReadLine();

}
}
}
fengcxf 2004-01-06
  • 打赏
  • 举报
回复
anybody know? help help help
lengfeng8866 2004-01-06
  • 打赏
  • 举报
回复
up

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧