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 is an application object & how it is different from c ache object? The Application object can be used in many situations where we want the data to be shared across user

Question: (a) Explain the function of the main .NET data objects: Connection, Command, DataReader, DataAdapter, DataSet, DataTableCollection, and DataView. (b) Describe h

What is Object Relational Designer? The 0/R Designer provides a visual design surface to make LINQ to SQL entity classes and associations (relationships) that are based on obje

The Events are always public as they are meant to serve each one registering to it. But you can access modifiers in the events.You may have events with protected keyword which will

What is a Class in dot Net? The class describes all the attributes of objects, as well as the methods which implement the behavior of member objects. It is a comprehensive data

Why The JavaScript Validation Not Run on the Asp.Net? The Asp.Net Button Is post backed on the server & not yet Submit & when It goes to the server its states is lost so if we

How can we identify that the Page is PostBack? The Page object has the "IsPostBack" property which can be checked to know that the page is posted back.

What does Xml Validating Reader class do? The XmlTextReader class does not validate the contents of an XML source against a schema. The correctness of the XML documents can be

What is cyclomatic complexity and why is it important? Cyclomatic complexity is a computer science metric (measurement) developed by Thomas McCabe used to generally calculate t

This is a whole time contractual role working for a sports advisory service. We are data insights consultancy specializing in sports. We consult to a number of sporting organizatio