如何在结尾没有换行符的情况下将字符串打印到控制台? [英] How can I print a string to the console without a newline at the end?
本文介绍了如何在结尾没有换行符的情况下将字符串打印到控制台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题是。
当您想用c#在问题旁回答时,您要输入什么?
what is it you type when you want your answer next to your question in c#
我的意思是这样,但是您在问题旁边输入答案。
I mean like this but you type the answer next to the question.
string product;
Console.WriteLine("What is the product you want?");
product = Console.ReadLine();
推荐答案
而不是使用 Console。 WriteLine()
使用 Console.Write()
这篇关于如何在结尾没有换行符的情况下将字符串打印到控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文