实现多个接口 [英] Implement multiple interface
本文介绍了实现多个接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何实现多个接口,举个例子.
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[^]
这篇关于实现多个接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文