C# Nested Class
I have a class Animal. Within the class Animal I have a list of another
class called Dogs.
class Animal
{
List<Dog> Dogs;
int CountNeutedDogs;
class Dog
{
// some properties
boolean neuted;
}
}
It's possible that the list can contain about 500 dogs at any one time. I
want to have an event so that if the value of neuted property in a dog
changes the CountNeutedDogs is informed and updated. How do I do this?
No comments:
Post a Comment