Skip to main content

Posts

Featured

Difference Between Console.Write(), Console.WriteLine() and Console.Read()

The  Write ()  method outputs one or more values to the screen without a new line character. The  WriteLine()  always appends a new line character to the end of the string. this means any subsequent output will start on a new line. Read Key  (returns a  character ): reads only one single character from the standard input stream. Usually used when you're giving options to the user in the console to select from, such as  select A, B or C . Another prominent example,  Press Y or n to continue . Read Line  (returns a  string ): reads only single line from the standard input stream. As an example, it can be used to  ask the user enter their name or age . Read  (returns an  int ): reads only one single character from the standard input stream. Similar to ReadKey except that it returns an integer.

Latest Posts

WhatsApp on-going educational campaign talks about creating awareness about spreading misinformation.