Difference between writeline and readline ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • snehaeee
    New Member
    • Sep 2006
    • 2

    Difference between writeline and readline ?

    what is the difference between writeline and readline
  • snehaeee
    New Member
    • Sep 2006
    • 2

    #2
    what is the difference between writeline and readline

    WriteLine: When you want to display on the command prompt writeline method will be used
    eg: if u want to ask a question called "What is U R Name"

    Read Line : if U want to take input from the user Means his name this method will be used
    "Good Name"
    eg: after question u can enter u r name then system will take your name

    Comment

    • joedeene
      Contributor
      • Jul 2008
      • 579

      #3
      Originally posted by snehaeee
      what is the difference between writeline and readline

      WriteLine: When you want to display on the command prompt writeline method will be used
      eg: if u want to ask a question called "What is U R Name"

      Read Line : if U want to take input from the user Means his name this method will be used
      "Good Name"
      eg: after question u can enter u r name then system will take your name
      correct for the console application. an example to use that would be:

      console.writeli ne("Please Enter Your Name:");
      string inputname = console.readlin e();
      console.writeli ne("Your Name Is : {0}",inputname) ;
      console.writeli ne("Press Any Key To Exit...");
      console.readkey ();

      *not tested but should work

      Comment

      • Curtis Rutland
        Recognized Expert Specialist
        • Apr 2008
        • 3264

        #4
        To be honest, I have no idea what's going on in this thread. You ask an incredibly basic question to which the answer is obvious to anyone that can read.

        Then you come back and answer your question as if you are a different person.

        I'm closing this thread before more of this foolishness can occur.

        MODERATOR

        BTW, joedeene, that code will not work. C# is case-sensitive, so that code would fail to compile.

        Comment

        Working...