Question: Code example 1 3 - 2 public class CustomerList { private List customers; public delegate void ChangeHandler ( CustomerList customers ) ; public event ChangeHandler

Code example 13-2
public class CustomerList
{
private List customers;
public delegate void ChangeHandler(CustomerList customers);
public event ChangeHandler ChangedList;
public CustomerList()
{
customers = new List();
}
public void Add(Customer c)
{
customers.Add(c);
}
public static CustomerList operator +(CustomerList customers, Customer c)
{
customers.Add(c);
return customers;
}
}
(Refer to code example 13-2) Which of the following statements activates the event thats declared for the CustomerList class?
Group of answer choices
if (ChangedList != null) ChangedList(this);
if (ChangedList == null) ChangedList(this);
if (ChangedHandler != null) ChangedHandler(this);
if (ChangedHandler == null) ChangedHandler(this);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!