Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

whySo

$
0
0

hi there

 Console.WriteLine("Enter your birthday in correct format");
            Console.Write("Date   {dd}  ");
        1.    date = Convert.ToInt32(Console.ReadLine()); // if i press enter than formatException occurs
            Console.Write("Month  {mm}  ");
         2.   month = Convert.ToInt32(Console.ReadLine());
            Console.Write("Year {yyyy}  ");
         3.  year = Convert.ToInt32(Console.ReadLine());

if i use Read() instead of ReadLine() than press enter for input 1, the control doesn't stop for 2 and third input...

m really confused 

please help

thanks


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>