Reading strings from the keyboard, DOT NET Programming

Reading strings from the keyboard  

using System;
class Prog3_1
{    
  public static void Main()
  {
   Console.Write ("Enter Your First Name : "); // Displaying to write first name
   string name1 = Console.ReadLine (); // Saving first name in name1
   Console.Write ("Enter Your Last Name : "); // Displaying to write last name
   string name2 = Console.ReadLine (); // Saving first name in name2
   Console.WriteLine ("Hello Mr." + name1 +" " + name2); // Displaying both first & last names
   Console.ReadLine (); // Since to stop the console for displaying last line, we use this to accept a
keystroke frm user. (Similar to getch() in C)
  }
}

Posted Date: 2/11/2013 2:55:14 AM | Location : United States







Related Discussions:- Reading strings from the keyboard, Assignment Help, Ask Question on Reading strings from the keyboard, Get Answer, Expert's Help, Reading strings from the keyboard Discussions

Write discussion on Reading strings from the keyboard
Your posts are moderated
Related Questions
What are the different Visual Basic features that support LINQ? Visual Basic includes the following features that support LINQ: Anonymous types - Enables you to make a ne

Project Description: Online game development 1. Online Live Baccarat Game is required - server program(IOCP or ect..). - 2D graphic design. - client program. - we

What is the difference between Convert.toString and .toString() method To know the difference between Convert.toString and .toString() see the below code : int i =0; Mess

What is a gateway or Router? A node that is linked to two or more networks is commonly called as router or Gateway. It generally forwards message from single network to another

Why do we use the XMLHttpRequest object in AJAX? The XMLHttpRequest object is used by JavaScript to transfer XML and other text data among client and server. The XMLHttpRequest

What is BCP utility in SQL SERVER? The Bulk Copy Program (BCP) is a command line utility by which you can import & export large amounts of data in and out of the SQL SERVER dat

About us in a nutshell: We are a young start-up that trade a refreshing product in the field of enterprise software and develops with the latest technologies. We love to partner wi

Name the two properties of the GridView control that have to be specified to turn on sorting and paging. The properties of the GridView control that require to be specified to


What is the use of "Must Inherit" keyword in VB.NET? If you want to create an abstract class in the VB.NET it is done by using the "MustInherit" keyword.You can't create an obj