In C# you can only inherit from a single base class. C++ is different, so I won't talk about that, so as not to confuse.
So you have a class which needs to derive from UserControl. Fine, you inherit UserControl in your class definition and off you go - you have a control you can add other controls to, and display.
class MyClass : UserControl
{
}
What if you also want this control to be used in a foreach loop, because it is a list of items in a database? For that, you need to implement a few methods or foreach won't work. But how do you tell the compiler that your class implements the required methods? Simple, you add the IEnumerable interface to your class definition:
class MyClass : UserControl, IEnumerable<string>
{
}
Now, in order for your code to compile, you have to add definitions of all the required methods:
public IEnumerator<string> GetEnumerator() { ... }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { ... }
When you do you have completed your side of the contract, and you can use your class in a foreach:
private void xxx()
{
MyClass mine = new MyClass();
foreach (string s in mine)
{
}
}
And, if you code them as you are supposed to (which is pretty easy most of the time) it will all work.
That is what an Interface is: a contract between you and the interface user. If you follow the rules, you can be a member of the club, and get whatever benefits the club provides.