제 질문은.마지막에 줄 바꿈없이 콘솔에 문자열을 인쇄하려면 어떻게해야합니까?
당신이 다음 C#에서 귀하의 질문에
이 같은 의미하지만 당신은 질문에 옆에 대답을 입력에 대한 답을 할 때 입력 한 내용입니다.
string product;
Console.WriteLine("What is the product you want?");
product = Console.ReadLine();
제 질문은.마지막에 줄 바꿈없이 콘솔에 문자열을 인쇄하려면 어떻게해야합니까?
당신이 다음 C#에서 귀하의 질문에
이 같은 의미하지만 당신은 질문에 옆에 대답을 입력에 대한 답을 할 때 입력 한 내용입니다.
string product;
Console.WriteLine("What is the product you want?");
product = Console.ReadLine();
줄 바꿈을 제거하려는 것 같습니다.
WriteLine
은 개행을 인쇄합니다.
Write
않습니다. 대신 Console.WriteLine()
사용을 사용
이 Console.Write()
string product;
Console.Write("What is the product you want?");
product = Console.ReadLine();
난 당신이 Console.Write("your text here");
오히려
Console.WriteLine("your text here");
이상 사용 쓰기를 찾고 생각() 대신를 WriteLine의(). –답변으로 얻은 답변 중에서 가장 좋은 해결책을 선택하십시오. – Bastardo