Guess What's new in Delphi.NET(0分)

  • 主题发起人 主题发起人 yysun
  • 开始时间 开始时间
Y

yysun

Unregistered / Unconfirmed
GUEST, unregistred user!
The main difference you will notice with Delphi.NET is that there are lots
of new classes. These classes are called the CLR (common language runtime)
and are the same classes used in C# and VB.NET.
then
there are a few differences in the way you program:
Indo
t Net you no longer need to free objects.
Indo
t Net strings can be Nil, which is different from the empty string.
Indo
t Net events can have multiple handlers.
Indo
t Net everything can have Attributes.
Indo
t Net you can have class properties and class fields.
Indo
t Net you can declare classes (and perhaps constants) inside other
classes.
Indo
t Net there are security settings which users can set for individual
applications or their whole computer which can restrict programs fromdo
ing
anything harmful.
Indo
t Net you can't use pointers (unless you want you program marked as
unsafe).
Indo
t Net RunTime Type Information is much more advanced (don't need to use
published).
Ido
n't know if the following will apply to Delphi.NET:
Variables of type TObject can store ANY value, even simple types like
Integer ordo
uble.
There is operator overloading.
Indo
t Net there is a different naming convention.
Delegates
=======
Method or procedure types are called delegates.
For example:
Type MyDelegate = procedure(x: Integer) of object;
This is equivalent to the C#:
delegate void MyDelegate(int x);
Delegates can store more than one procedure at a time.
The same delegate can store ordinary procedures, methods, or class methods.
Itdo
esn't care.
Indo
t Net the types normally have names like SomethingEventHandler instead
of the delphi style TSomethingEvent.
All Delegates inherit from the Delegate class, and you can call methods on
them.
Delegates could be used directly (which would be very powerful), but mostly
they are used with a special type of property called an Event, which limits
their usefulness dramatically.
Events
=====
Events are a special type of Property used for method types. The thing is
instead of the normal "read" and "write" methods that normal properties use,
events use "add" and "remove". This makes Events much less powerful than if
a public Delegate field had just been declared. There is no way of getting
the current list of methods assigned to the event, or of replacing the
methods with a new method. This is going to be a pain for Delphi programmers
unless Borlanddo
es something clever (which can bedo
ne easily).
Events normally have names like "DoubleClick" instead of the Delphi
"OnDblClick".
Objects normally have a protected method which fires the event. Indo
t Net
they have VERY CONFUSING names like "OnDoubleClick" instead of the Delphi
"DoDblClick" or just "DblClick".do
not be confused. They are just ordinary
methods which check if the event is Nil and if not it calls the event. They
are not the events themselves.
There are some websites which describedo
t net from a delphi point of view:
http://www.gekko-software.nl/DotNet/
And websites about Delphi.NET
http://community.borland.com/article/0,1410,28649,00.html
http://homepages.borland.com/aohlsson/BorCon2002/
Carl
以上摘自新闻组 borland.public.delphi.non-technical
 
supplement:
2002/05/26 - BorCon 2002 Delphi News: Charlotte
Summary: Kylix 3 (codename Cortez) will ship in 2002, and will contain a Delphi as well as C++ IDE. Delphi 7 (codename Aurora) will ship in (the second half of) 2002 (and will contain a preview edition of Delphi for .NET, consisting of DCCIL command-line compiler and VCL for .NET). A .NET Development Studio (codename Galileo) will ship in 2003 - supporting multiple populair .NET languages (including Delphi for .NET).
Finally, Borland previewed a programming language for Web Services creation &
scripting (codename Charlotte).
You can get details from here:
http://www.drbob42.com/csharp/index.htm
 
delphi.net and vs.net ,which one is better?
excuse my asking such a stupid question,i am just a begin
ner of .net.
 

Similar threads

A
回复
0
查看
932
Andreas Hausladen
A
A
回复
0
查看
805
Andreas Hausladen
A
A
回复
0
查看
655
Andreas Hausladen
A
A
回复
0
查看
834
Andreas Hausladen
A
后退
顶部