While doing the ‘True or False?’ assignment I was a bit irked that the class “Tools”, wasn’t included with it’s method “SetInputStream” with the parameter “entry”. While you don’t necessarily need this class to finish the assignment I decided to work through the error that was being thrown because it didn’t exist!
using System;
namespace TrueOrFalse
{
public static class Tools
{
public static void SetUpInputStream(string entry)
{
Console.WriteLine("Press Enter to continue...");
Console.ReadLine();
}
}
}
To set this up in Visual Studio you can navigate to the “Project” tab and hit the “Add Class” button, then create a new class. After, you can just copy and paste this code into Visual Studio. Save the class file then away you go! You can now do this assignment without the hindrance of a missing class.
Another tidbit,-- in my assignment I got rid of the Console.ReadLine() associated with the string “entry” and replaced it with “string entry = String.Empty;” . I did this because I added a Console.ReadLine(); to the method above.