I'm trying to understand the observer pattern using C#, first I have an abstract class working as Subject called Stock, then I'm creating a concreteSubject class so I'm going to call it IBM, as the concreteSubject Class is going to inherit from Stock, so I do something like this:
class IBM : Stock
{
// Constructor
public IBM(string symbol, double price)
: base(symbol, price)
{
}
}
what I don't understand is the " : base(symbol, price) " why should I use it? what that means? it looks like its inherit the symbol and price variables, but why if they are declared as parameters on the public IBM function
I get this code from an example that I found in:
http://www.dofactory.com/Patterns/PatternObserver.aspx#_self1