How to read user input in c# console

后端 未结 4 1779
[愿得一人]
[愿得一人] 2021-01-16 11:45

I guess this should be very simple to you guys, but very difficult to me because im new to c#.

I have a simple \"pacient\" class.

public class Pacien         


        
4条回答
  •  伪装坚强ぢ
    2021-01-16 11:47

    Think you can find all the info you need right here.

    string line = Console.ReadLine(); // Read string from console
    

    Tip for the future: you already knew that this was called the console, because you used that word in the question. So looking for 'C# console read text' on Google would be a good way to answer this question yourself. (Note: this is not flaming, just some feedback for the next question)

提交回复
热议问题