C#:实现接口的类是否包含接口外的方法?

the*_*tig -7 c# interface

非常简单的问题.我知道在java中你可以,但在C#中可以吗?

Bry*_*her 5

喜欢:

interface IFoo
{
    void Foo ();
}

class FooBar : IFoo
{
    void Foo () { }
    void Bar () { }
}
Run Code Online (Sandbox Code Playgroud)

如果这是你的问题,是的,你可以.