实现多个接口

问题描述:

如何实现多个接口,举个例子.

How you will implement multiple interface, give an example.

只需用逗号将接口一个接一个地放置,然后可以在Visual Studio中右键单击并选择实现接口",它将为您提供您必须编写的方法.

Just put the interfaces one after another with a comma, then you can right click in Visual Studio and select Implement Interface which will give your the methods you have to write.

public class SomeClass : Interface1, Interface2 
{
...
}


看看下面的文章
显式接口实现教程 [
Take a look at the following article
Explicit Interface Implementation Tutorial[^]


请参阅在这里

http://www.codersource.net/microsoft-net/c-basics-tutorials/c-net-tutorial-interfaces.aspx

http://www.pcreview.co.uk/forums/wanted-practical-example-multiple-interfaces-c-t3919189.html [
See here

http://www.codersource.net/microsoft-net/c-basics-tutorials/c-net-tutorial-interfaces.aspx

http://www.pcreview.co.uk/forums/wanted-practical-example-multiple-interfaces-c-t3919189.html[^]