This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术讨论 / C#中, 声明一个抽象类, 继承于一个接口, 那么在抽象类中需要实现接口函数吗?
-tonyhao(tonyhao);
2008-10-11
(#4759674@0)
-
兄台,能不能用英文写专业术语,让俺也能看懂点
-c1xwy(洪兴罩俺去战斗);
2008-10-11
(#4759685@0)
-
你可以自己试,看编译器能通过否,有结论后,在更新一下帖子
-googlebot(bot);
2008-10-11
(#4759706@0)
-
All methods in interface has to be implemented in child class no mater it’s abstract or normal.
-deep_blue(BLUE);
2008-10-12
(#4760107@0)
-
Yes
-tonyhao(tonyhao);
2008-10-12
(#4760765@0)
-
Actually, MS already suggest not using abstract class, use interface instead. Because some Rumtime issue. If I remmeber correctly
-21cnhanhao(大耳朵兔子);
2008-10-15
(#4769466@0)
-
Never heard about the issue. You might misunderstand.There are technical issues with multiple inheritance, so many OO languages restrict inheritance to a single direct base class (either normal or abstract). However multiple- interface inheritance is not limited. This doesn’t mean you cannot use abstract class.
-deep_blue(BLUE);
2008-10-16
{261}
(#4772277@0)
-
正好相反
-tonyhao(tonyhao);
2008-10-17
(#4773306@0)
-
en, 在微软出的一本书中看到过作者对抽象类和接口的说明,那小子所在的项目第一版全都用的接口,然后后悔不已。第二版全都改成了抽象类 ^_^
-binghongcha76(一只大猫);
2008-10-17
(#4773371@0)
-
As a base class in project. We can make our decision as follows:if you need "multiple inheritance", you must use Interface. If the base class will be changed often, I prefer abstract class. If you had some "default behaviour" that will implement in every child class, then just use a normal class. For other situation do as you like.
-benbendan(相忘于江湖);
2008-10-17
{274}
(#4773622@0)
-
Actually abstract class is quite different from interface.
-deep_blue(BLUE);
2008-10-17
{1405}
(#4774397@0)
-
借你帖问一个编程构架问题: WEB APPLICATION 就没必要多层次OO了. ? 一个PAGEBASE大家INHERIT就够了?PAGE POSTBACK 后OO中的CLASS FIELD (PUBLIC)就不能用了. 我只能用VIEWSTATE来代替.
也许我还不懂更高深的... (我只是入门菜鸟)
-whereismyid(到处找ID);
2008-10-17
{120}
(#4773389@0)
-
cannot understand
-win(秋天的菠菜);
2008-10-17
(#4773394@0)
-
表达有问题. 我的意思是WEB APPLICATION 没必要复杂OO.
-whereismyid(到处找ID);
2008-10-17
(#4773426@0)
-
OO好处是代码重用。我碰到一位同胞把同样的代码copy到几十个地方,跟我谈心得:copy完了再加点新东西,又可以和领导说新写了多少多少代码。NND他现在跳槽走了,让我接手这垃圾,同样的错误一发现就要改几十个地方。
-tjhong(我检讨);
2008-10-17
(#4773496@0)
-
OO本意是为了系统容易维护,class代码相对独立,这个人代码肯定不是OO,设计好的class,不会改这么多地方。 OO其实也没什么用,MS牛B, MS .Net framework 那么多class, 前后版本都不兼容,说明OO对大系统没什么意义,unix/linux还是用C
-googlebot(bot);
2008-10-17
(#4773543@0)
-
为啥要前后版本兼容,把.NET Framework 1.1/2.0/3.0/3.5全装上就是了,一个也就20-30兆大小,免费。
-tjhong(我检讨);
2008-10-17
(#4773636@0)
-
你装过没?20-30M ? 太小看MS ,运行一个.net exe,要装一堆东西,还分版本, 太烂了
-googlebot(bot);
2008-10-17
(#4774000@0)
-
只能是说你在不懂装懂。
-tjhong(我检讨);
2008-10-17
(#4774303@0)
-
Microsoft .NET Framework Version 1.1 Redistributable ==>
-tjhong(我检讨);
2008-10-17
(#4774307@0)
-
Microsoft .NET Framework Version 2.0 Redistributable ==>
-tjhong(我检讨);
2008-10-17
(#4774313@0)
-
Microsoft .NET Framework 3.0 Redistributable ==>
-tjhong(我检讨);
2008-10-17
(#4774321@0)
-
that's right. my working environment was installed all versions of .net framework
-whereismyid(到处找ID);
2008-10-17
(#4774030@0)
-
也不一定都是垃圾吧. 把去ROMA的路搞复杂点也是一种求生之道.
-whereismyid(到处找ID);
2008-10-17
(#4774016@0)
-
所言极是。
-tjhong(我检讨);
2008-10-17
(#4774393@0)
-
你也跟领导说你一天就改了几十个地方不 就行了 , FT, 你还不领情
-maplew2008(9.1.1);
2008-10-17
(#4774326@0)
-
所言极是。
-tjhong(我检讨);
2008-10-17
(#4774390@0)