Answer to Question #4559 in C# for Steve Frey

Question #4559
How do you input data (one letter for example) one at a time in a class other than Main().
1
Expert's answer
2011-10-14T13:10:19-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace One_letter
{
class Program
{
& static void Main(string[] args)
& {
int result=10;
string inputstring = "";
Console.Write("Enter string: ");

while (result != 0)
{
Console.WriteLine(inputstring);
inputstring = Console.ReadLine();
}
& }
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS