Kevin,
That was exactly my first thought about Interfaces ... what good are they? But then I learned ... the main benefits of defining Interfaces is that if a lot of objects implement the same Interface, you can reference properties or methods on the Interface and not have to know exactly which class is being used.
For example, say I have two kinds of TextBoxes ... MyTextBox, MySpecialTextBox. They both implement an Interface, say IBindThis, which has a method called MyBinding(). So, when you're doing some binding on your form, you can check whether the object (the TextBox) implements the Interface and work from there. Something like this:
if (oControl is IBindThis)
((IBindThis)oControl).MyBinding();
As you can see, you can call the MyBinding() method because you know that this particular object will have that method defined. Furthermore, you can cast the object to the Inteface in order to be able to call it's method.
Hope that clears things up a bit.
~~Bonnie
>well, yes and no ;)
>
>I went back and read the two pieces of documentation that I have on them. What I'm a bit hazy on is the benefit that custom interfaces provide. I'm sure they do, but I'm just not quite 'getting it'. After a year and a half, I still find myself in 'learning mode' with .NET!
>
>Thanks,
>Kevin