Talking by C #

zhaozj2021-02-11  181

Talking by C #

The software technology is changing, and the sun is different. It makes people feel that the software technology is entering the virtual era. Hey, everyone has been prepared. Of course, the change is not from its Zong, basics is still very important.

If C is flexible and efficient, the C # is a concise, humanized, consistent with Anders Hejlsberg.

Learn Delphi will find that IS / AS operator; such as the Item class, the method inside is almost the same; the return Sender reference is similar in the event; the WinForm class's inheritance system, etc., this is not surprising, all the master Anders Hejlsberg's work should be perfect. I think Anders Hejlsberg is more advanced when doing Delphi, and of course Delphi is not bad in the mode. Look at this.

I think Andrs Hejlsberg is when C # is more than Delphi, it has great progress in the mode, of course, Delphi is not bad in DB. See this will know.

In Delphi is in C # is

TOBJECT OBJECT

TPERSISTENT MARSHALBYREFOBJECT

Tcomponent Component

TControl Control

TwinControl

TscrollingWincontrol ScrollableControl

Tcustomform ContainerControl

TFORM FORM

Improper is this, the method and attributes are similar. It can be seen that the brothers who are familiar with Delphi have a lot of benefits.

C # is a big feature is humanized, such as Reflection / Persistence / Serialze / Remoting (Similar to Java), but more excellent, functional extension is very good.

The .NET architecture is very paying attention to design mode (Java is also good), such as the various categories under System.convert, the type conversion mode in System.Convert, the simple and clear mode. Net Processing the database is also good. Such as the SqlDataReaderod series Coupled, harmonious.

Assembly contains modules, the module contains types, and the type is included. Assembly is the meta-element description, the idembly is very good, not like the COM component, each component needs to be registered, assembly is implemented by reflection, I don't know if the EJB component can be self-description. This explain .NET The component model has new progress.

COBJECT in the MFC is not good enough. It does not guarantee the smallest interface, which is much different from C # / VCL. And C # / VCL has been decomposed very well through a series of single inheritance systems, this is a large MFC. Disadvantages, give an example, if I inherit a class from cobject, think about it, is it too big? Some don't need, I feel, at least inherited from COBJECT, try to keep the interface minimum the rules.

In C #, put the Namespace excellent, I think, and other OO principles, in the area where there is a demand point, so I have a namespace. Look, all the C #, things can be used to use oo Thoughts to understand?

COBJECT in the MFC is not good enough, it does not guarantee the smallest interface, which is much better relative to C # / VCL. After a series of single inheritance system, it is well decomposed, this is a big shortcoming of MFC, Example, if I inherit a class from cobject, think about it, is it too big? Some don't need, I feel, at least inherited from COBJECT, try to keep the principle of the smallest interface.

In C #, put the Namespace excellent, I think, and other OO principles, in the area where there is a demand point, so I have a namespace. Look, all the C #, things can be used to use oo Ideological to understand? I think C # can increase the stuff:

1. In these cases, the class is also allowed to inherit from the Object class because it enforces our design ideas, but relatively simple, no flexibility.

2. GP support, but the GP seems to be not very mature, as if the next version will support the first writing article, there is a place to be advised. My QQ is 48488278.

转载请注明原文地址:https://www.9cbs.com/read-4296.html

New Post(0)