Calling a method on an object in a list

suggest change
public class Customer {
   public void SendEmail()
   {
       // Sending email code here
   }
}

List<Customer> customers = new List<Customer>();

customers.Add(new Customer());
customers.Add(new Customer());

customers.ForEach(c => c.SendEmail());

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents