How to enter inputs in C# | Sololearn: Learn to code for FREE!

+2

How to enter inputs in C#

c#

11/12/2020 3:38:07 AM

H.Nelson

14 Answers

New Answer

+3

Console.Readline()

+2

When you use Console.ReadLine(); , a window will pop up to get the user input .

+2

Like suppose, im taking input of user's name, so i write this code: var name = Console.ReadLine(); Console.Write(name); Now in the input box, user has written his name, suppose he wrote: John So now the output will be the user's name. I hope this helps u.

+2

Thanks

+2

Hm, you uses Githab?

+1

To get user input in C# use : Console.ReadLine();

+1

After writing my program a window pop up saying "your program needs input"

+1

What does it mean?

+1

Use Console.Readline ();

+1

the box is where ou put your input

+1

0

Can you give me an example ?

0

So we can't give inputs in C# solo learn