C# read() method - how to skip enter characters

Apr 4 2019 1:18 AM
Ex: Console.WriteLine("Enter Sex");
Console.Read();
Console.WriteLine("enter Place");
Console.ReadLine();
 
 
o/p:
Enter Sex
M
Enter Place
 
here place value not taken (readLine takes enter value)
 
 
when we give character and press enter, enter value takes readLine() method. how to skip this 
 

Brought to you by:

Answers (7)