I'm having big trouble understanding this.
namespace nspace
{
public class eclass
{
public double elevation { get; set; }
}
public class Program
{
static void Main(string[] args)
{
eclass first = new eclass();
first.elevation = 500;
Console.WriteLine(first.elevation);
Console.ReadKey();
}
static void setup()
{
Console.WriteLine(eclass.first.elevation); // line dosent work
Console.ReadKey();
}
}
}
I cannot output the value where it is commented, and I dont understand why, or how it can be possible, I need to set the properties of that object anywhere in my code.
can someone who nows explain my wrongdoing?