there is a method:

public class Job { public string name, firm, city; public int cost; static void lol() { int i = 0; } } 

and I cannot access the static field, it gives the error "Job does not contain a definition for lol"

 Job.lol(); 

With what it can be connected?(

  • 9
    public static void lol(... - Igor
  • Well damn, as I did not understand. Thank you) somehow reworked) - Nikolay

1 answer 1

the error was that the access modifier did not define "public static void lol (...". Thanks to Igor for the help)

  • On health. Successes in programming! - Igor