It is my understanding that a public variable declared at the class level of a program was available everywhere else in the program.
In the following code:
namespace Lab13
{
class Program
{
int lower = int.Parse(Console.ReadLine());
static void Main(string[] args)
{
Console.Write("Enter a lower bound number:");
lower = int.Parse(Console.ReadLine());
}
}
}
I get a compile error with regards to my assignment of lower.