轉貼: VB.NET New Features(編號:8171)

看完後, 我的感想是: 程式可有得改了... :[
VB.NET New Features
Inheritance
You can derive a class from a parent class.

Structured Error Handling
There will be some kind of more structured error handling

Coexistance
You should be able to run VB6 and VB.NET on the same computer.

Upgrading
When you load a VB6 project in VB.NET, Visual Basic automatically upgrades many features that are no longer supported.

Control Anchors
You can anchor a control, to the lower left corner of the form
 for example, so you don't need to reposition it in Form_Resize.

Easy Delpoyment
You can install executables and components by copying them into the right directory. No more messing with Regsvr32.

New Forms
Visual Basic forms become Windows forms.

No PrintForm
Windows forms do not have PrintForm. I don't know what we're supposed to use instead.

Unified IDE
All Microsoft languages use the same IDE. You can debug an OCX written in C++ while running it in a VB.NET program.

Extensibility Model
The new extensibility model applies to the IDE universally. That means you can write Add-Ins in VB.NET and use them in C#.

GDI+
The GDI(Graphics Device Interface) has new functions including Alpha blending,anti-aliasing, and support for more file formats.(看過 Vol.9 No.5 的 MSDN news 自然知道這是什麼功能)

ADO.NET
Improved performance.

No DAO/RDO Binding
VB.NET does not support DAO or RDO data binding, Data controls, or the RDO User Connection.

Object type
The Variant type is disappearing. The Object type can now hold a primitive datatype, Empty, Nothing, Null, or a reference to an object.

Integer, Short
The 16-bit Integer type is now called Short. The 32-bit Long type is now called Integer.

"Easier" Property Procedures
Property Get and Set procedures now look like this:
  Property MyProperty() As Short
    Get
      m_MyProperty = MyProperty
    End Get
    Set
      m_MyProperty = Value
    End Set  
  End Property

No Parameterless Defaults
You can no longer say Text1 = "Hello". You must say Text1.Text = "Hello".

True = 1
True no longer equals -1. Now it equals 1.

Bitwise Operators
AND, OR, NOT, and XOR not are Boolean operators. The bitwise versions are BitAnd, BitOr, BitNot, and BitXor.

Short-circuit Evaluation
When VB6 executes this statement, both Function1 and Function2 are called no matter what value Function1 returns:
  If Function1() And Function2() Then ...
 In VB.NET, Function2 is not called if Function1 returns False.

No Null Propagation
Any VB6 statement that involved a Null value was Null. For example, Null & "x" = Null. In VB.NET, statements involving Null generate a type mismatch error.

Zero-Based Arrays
All arrays are zero-based. You can no longer say Dim X(1 To 10) As Integer.

No Option Base
The Option Base statement no longer exists(since all arrays are zero-based).

No Fixed-Length Strings
There are no more fixed-length strings.

No Fixed-Size Arrays in UDTs
When you make a user-defined type(UDT), arrays should be undimensioned. You ReDim the array after creating an item of this type.

No Def<Type>
These statements no longer exist.

No Computed GoTo
This statement no longer exists.

No GoSub/Return
These statements no longer exist.

No VarPtr, ObjPtr, StrPtr, etc.
These statements no longer exist.

No LSet
This statement no longer exists.

No As Any
You cannot use As Any in API declarations. You must make separate declarations for each data type you will pass to the API function.

No OLE Container
The Windows form does not support this control.

No Shape or Line Controls
These no longer exist.

New Graphics Methods
New methods replace Circle, CLS, PSet, Line, and Point.

Timer Interval
Setting a Timer's Interval to 0 does not disable it.

Context Menus
Windows forms have a main menu and a separate context menu used for popups.

No DDE
Windows forms do not support DDE.

New Drag and Drop
Drag and Drop still exists but is different.

New Clipboard
Improved clipboard functions.

Name Property
The Name property is no longer available at run time.