I have the following classes
Customer Class
abstract class Customer
{
public int id;
public string name;
public double balance;
}
class NormalCustomer
class NormalCustomer: Customer
{
}
class SubscriberCustomer
class SubscriberCustomer:Customer
{
public int LandMinutes;
public int MobileMinutes;
}
If we create an array Customers
Customer[] customers = new Customer[100];
customers[0]=new NormalCustomer();
customers[1] = new NormalCustomer();
customers[2] = new SubscriberCustomer();
customers[3] = new NormalCustomer();
customers[4] = new SubscriberCustomer();
The question is how to find out how many objects are in the array NormalCustomersand how many objects are in the array SubscriberCustomers?
source
share