请向我解释如何使用界面简化我的工作 [英] please explain me how can I use interfaces to make my work easy

查看:97
本文介绍了请向我解释如何使用界面简化我的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,
我对接口的使用感到困惑.我知道它们是什么以及它们如何工作.我很想知道如何使用自己的界面来更好地管理程序代码.我正在设计一个大型医院表格,您可以在其中打开多个表格.这些表格在控件上具有一些共同的功能.
抱歉,如果我的问题很愚蠢..我是新手程序员
非常感谢您的宝贵时间.
问候

Hi friends,
I am confused on the use of interfaces. I know what they are and how they works. I am curious to know how I can make my program codes better managed using my own interfaces. I am designing a big hospital form where you can open multiple forms. those forms have some common functionalities over the controls.
Sorry If my question is silly.. I am novice programmer
Thank you so much for your time.
Regards

推荐答案

您可以先阅读

这里是C#书中相当不错的免费章节:

http://msdn.microsoft.com/en-us/library/orm- 9780596521066-01-13.aspx [ ^ ]

在您的情况下,似乎最好为某些通用基类而不是接口提供服务.

这是另一个链接(尽管是较旧的文章),它讨论了当您选择抽象类上的接口时的情况:

http://msdn.microsoft.com/en-us/library/scsyfw1d (v = vs.71).aspx [
Here''s a pretty good free chapter from a C# book:

http://msdn.microsoft.com/en-us/library/orm-9780596521066-01-13.aspx[^]

In your case it seems like you may be better served with some common base classes rather than interfaces.

Here''s another link (older article though) that talks about when you choose an interface over an abstract class:

http://msdn.microsoft.com/en-us/library/scsyfw1d(v=vs.71).aspx[^]


这篇关于请向我解释如何使用界面简化我的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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