NotPolicallyCorrect's comment is correct - the hard part is, everyone 'groks' these sorts of things differently, and SO in particular like everyone to use 'the correct language/terms' - it took me ages to grok 'x => x % 2 == 0' for example, because it wasn't really a relevant example to me at that stage
- I think where you're coming from in your head 'having some common functionality' is ok, and that common functionality is 'the contract'
You said you'd tried "C# interfaces such as ICommand and INotifyPropertyChanged." - er, ok, they might have been a bit complex to start with - I'd hard started with something 'simpler' myself :-)
At the risk of un-doing all the good work so far, I'll present this example
public interface ILogger
{
public void Log(string msg);
}
public class FileLogger : ILogger
{
}
public class TextBoxLogger : ILogger
{
}
public class DatabaseLogger : ILogger
{
}
So, you have the interface, ILogger, that says, any class that implements me MUST implement Log(string msg); because that's the 'contract' specified by the Interface definition
.. irrespective of whether you're using the FileLogger, TextBoxLogger, DatabaseLogger, once you have an instance of those objects, you only ever call Log("some message");
maybe that helps