public static void LogEven(object Sender, IntEventArgs e) { if (e.Value % 2 == 0) { Console.WriteLine("Парне значення стану"); } }
private void Handler(object Sender, IntEventArgs e) { if (Condition(e.Value)) { Count++; Console.WriteLine($"Стан задовільнив умову {Count} разів"); } }
public static void Log(object Sender, IntEventArgs e) { Console.WriteLine($"Нове значення стану: {e.Value}"); }