Your code will never compile because 'Outputclass does not contain a constructor that takes zero arguments.
You need to get a good book on .NET and study the basic aspects of using 'Classes. ".NET Zero" by Charles Petzold is free to download: [
^].
You can use a working example of a read-eval-print-loop, like the one shown here to study how a Console Application works: set break-points in the code and single-step (F11 in Visual Studio) through the code:
class Program
{
public static void Main()
{
string inputMessage = "Enter <any characters=""> to continue: Enter <return> to Exit";
string newEntry = "You entered: ";
Outputclass o = new Outputclass("get a good .NET book");
o.PrintString();
Console.WriteLine(inputMessage);
string line;
while ((line = Console.ReadLine()) != string.Empty)
{
o.myString = string.Format("{0}{1}", newEntry, line);
o.PrintString();
Console.WriteLine(inputMessage);
}
Console.WriteLine("exiting Application");
Environment.Exit(0);
}
}
class Outputclass
{
public string myString { set; get; }
public void PrintString()
{
Console.WriteLine(myString);
}
public Outputclass(string inputString)
{
myString = inputString;
}
}