what is the difference between writeline and readline
Difference between writeline and readline ?
Collapse
This topic is closed.
X
X
-
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 -
Originally posted by snehaeeewhat 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
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 workComment
-
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
Comment