Download for Windows Premium
Publiciteit
clasei Program
Program class
Compilatorul ar fi putut face acest lucru, direct în cadrul clasei Program, pentru a desfășura expresiile lambda
The compiler could have done this directly inside the Program class, to unwrap the lambdas
Dar dacă compilatorul ar fi desfășurat expresia noastră lambda ca o variabilă i statică în interiorul clasei Program, atât a, cât și b, ar face referire la același i, deci, indiferent dacă aș invoca a sau b, acestea ar incrementa același i.
But if the compiler unwrapped our lambda expression as a static i inside Program class, both a and b would reference the same i, so, regardless if I would invoke a or b, they would increment the same i.
Apoi, în cadrul clasei Program, instanțiem clasa Cuptor și încercăm să accesăm metodele Porneste și Opreste.
Then, inside the Program class, we instantiate the Oven class, and we try to access its TurnOn and TurnOff methods.
Primul lucru ciudat pe care ar trebui să-l observați este faptul că delegatul meu se află în afara clasei Program.
The first odd thing you should notice is the fact that my delegate is outside the Program class.
Pe de altă parte, metoda Porneste, fiind declarată publică, este accesibilă atât clasei unde a fost declarată, cât și clasei Program. Prin urmare.
On the other side, method TurnOn(), being declared public is accessible to both the class where it was declared, and to the Program class.
Er zijn geen resultaten gevonden voor deze term.

Synoniemen voor clasei Program in het Roemeens

Publiciteit

Resultaten: 5. Exact: 5. Verstreken tijd: 19 ms.