MCQs > IT & Programming > C# > Look at the following code: public delegate void EventHandler(); public static event EventHandler handler; static void Bar() { Console.WriteLine('Bar'); } Which of the following is a valid way to assign a new event handler?

C# MCQs

Look at the following code: public delegate void EventHandler(); public static event EventHandler handler; static void Bar() { Console.WriteLine("Bar"); } Which of the following is a valid way to assign a new event handler?

Answer

Correct Answer: handler += new EventHandler(Bar);

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it