有谁知道C#标准输入标准输出是指那个语句?

white_dove3000 2005-05-16 08:18:44
C语言中标准输入语句scanf()和标准输出的语句是printf()
有谁知道C#中对应的是什么?
...全文
1618 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
柯嘉 2005-05-16
  • 打赏
  • 举报
回复
准确地说,没有。
white_dove3000 2005-05-16
  • 打赏
  • 举报
回复
ewan_shu(张无忌) ,这样写不行啊,你试了一下没有啊?

string buf = Console.ReadLine();
Console.WriteLine("I get the string "+buf);
ewan_shu 2005-05-16
  • 打赏
  • 举报
回复
string buf = Console.ReadLine();
Console.WriteLine("I get the string "+buf);
Philip3 2005-05-16
  • 打赏
  • 举报
回复
标准输出:
System.Console.Write()
System.Console.WriteLine()
标准输入:
System.Console.Read()
System.Console.ReadLine()
white_dove3000 2005-05-16
  • 打赏
  • 举报
回复
在C#下如何实现下面C语言写的程序?

将前一个设备的标准输出定向到后一个设备的标准输入,例如程序如下:

///////////////
////test.c/////
///////////////
#include <stdio.h>

int main(void)
{
printf("%s", Y.Jing);
return 0;
}


///////////////
////test2.c/////
///////////////
#include <stdio.h>

int main(void)
{
char buf[1024];
scanf("%s", buf);
printf("i get the string %s\n", buf);
return 0;
}


C:\>test.exe | test2.exe
i get the string Y.Jing
soddyzjx118 2005-05-16
  • 打赏
  • 举报
回复
标准输出:
System.Console.Write()
System.Console.WriteLine()
标准输入:
System.Console.Read()
System.Console.ReadLine()
htwoolotus 2005-05-16
  • 打赏
  • 举报
回复
标准输出:
System.Console.Write()
System.Console.WriteLine()
标准输入:
System.Console.Read()
System.Console.ReadLine()

bobseadream 2005-05-16
  • 打赏
  • 举报
回复
将string字符串输出到屏幕:Console.Write(string);
输出后换行:Console.WriteLine(string);
从输入流接收一个字符:Console.Read();
接收字符串:Console.ReadLine();

110,535

社区成员

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

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

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