使用接口类的问题或缺点是什么 [英] What is the problems or disadvantages of using interface class

查看:169
本文介绍了使用接口类的问题或缺点是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I work on c# on visual studio 2015 i read and using interface class more

public interface dataInterface { //prototype function here }
and it have big role in solving multi inheritance on csharp

so that

What is the problems or disadvantages of using interface ?



我尝试过的事情:



What I have tried:

what is the problems or disadvantages of using interface class

推荐答案

我们不做作业:它的设置是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

自己尝试,您可能会发现它并不像您想的那么难-您的导师希望您对此有所想法,而不是我的想法.因此,首先要考虑接口与类的区别以及您可能将它们用于什么.

如果您遇到特定问题,请询问此问题,我们将尽最大努力为您提供帮助.但是我们不会为您做所有这一切!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think - your tutor wants youir thoughts on this, not mine. So start by thinking about how an Interface differs from a Class and what you might use them for.

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren''t going to do it all for you!


在此处查看文章: ^ ]
C#中的显式接口VS隐式接口? [ ^ ]
See articles here: Interfaces in C# (For Beginners)[^]
Explicit Interface VS Implicit Interface in C#?[^]


接口本身是很有价值的(也就是说,它们在OOP编程中是一个简洁的概念).然后,它们也是缺少C#编程语言的多重继承的解决方法.您可以在文档(和好书)中轻松找到所有详细信息.
Interfaces are valueable themselves (that is they are a neat concept in OOP programming). Then they are also the workaround to the lack of multiple inheritance of the C# programming language. You may easily find all the details in the documentation (and in good books).


这篇关于使用接口类的问题或缺点是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆