There are class House and class Room. In the House class, in the Rooms [] field is stored an array of class Room. These buttons display whether the number is free / busy (they are created dynamically depending on their count). How to make it so that by pressing one of the buttons, she worked out the event. For example, I press button 10, it changes color to blue.
1 answer
Something like this:
var btn = new Button(); ... btn.Click += (sender, e) => { ... }; - Thanks It works! A => what kind of operator? - Ximik
- one@Ximik, lambda function. - Qwertiy ♦
- I would say a lambda function (lambda expression). - BlackWitcher
|
