Breaking changes ?SPAN style="FONT: 7pt 'Times New Roman'"> Equality comparison of two reference typed objects must be performed with the Is operator rather than with = or <>. The reason for this change is that once VB supports operator overloading, old code could break because it would call the overloaded operator = instead of doing simple reference comparison. ?SPAN style="FONT: 7pt 'Times New Roman'"> Visual Basic.NET will require the use of the Handles clause in order to declaratively establish an event handler. This does not affect the use of AddHandler() to do dynamic event hookup. ?SPAN style="FONT: 7pt 'Times New Roman'"> CChar() can no longer be passed a numeric type. Instead, use Chr() to convert a number to a character. Also, the numeric conversion functions Cshort(), Cint(), CLng(), CDbl(), Cdec() will not support conversion of a char to the numeric types. Instead, use Asc(). ?SPAN style="FONT: 7pt 'Times New Roman'"> The items from the Microsoft.VisualBasic.Compatibility.VB6 namespace will be moved into the Microsoft.VisualBasic namespace. Non-breaking changes ?SPAN style="FONT: 7pt 'Times New Roman'"> Implicit conversions between strings and dates, strings and Boolean operators, and strings and numeric types will be allowed when Option Strict is turned off. ?SPAN style="FONT: 7pt 'Times New Roman'"> The Handles clause will support writing events that are raised by the base class, which avoids the need to explicitly define a WithEvents variable that is set to point to the base class. ?SPAN style="FONT: 7pt 'Times New Roman'"> Parameters for ParamArray and ByRef parameters are now supported for late-bound methods. ?SPAN style="FONT: 7pt 'Times New Roman'"> Support for static locals has been added. More Breaking changes ?SPAN style="FONT: 7pt 'Times New Roman'"> The BitAnd, BitOr, and BitNot operators have been removed. ?SPAN style="FONT: 7pt 'Times New Roman'"> The And, Or, Xor, and Not operators of VB6 are restored to VB.NET. These operators work on both numeric and Boolean types. When used on numeric types, they perform a bitwise operation; when used on Boolean types, they perform a Boolean operation. The precedence of these operators is the same as the existing And, Or, Xor, and Not operators in VB.NET. None of these operators short-circuit. ?SPAN style="FONT: 7pt 'Times New Roman'"> When the Boolean value True is converted to integer, it now maps to -1 rather than 1. ?SPAN style="FONT: 7pt 'Times New Roman'"> The short-circuiting Boolean And operator is supported with the name AndAlso. ?SPAN style="FONT: 7pt 'Times New Roman'"> The short-circuiting Boolean Or operator is now named OrElse. ?SPAN style="FONT: 7pt 'Times New Roman'"> The meaning of the number specified when creating a new array instance has changed from the size of the array dimension (the meaning used in C) to the upper bound of the array dimension (the meaning used in VB6). For example, New Integer(10) now creates an array with elements indexed from 0 to 10 rather than from 0 to 9. Similarly, Dim x(10) As Integer now creates an array indexed from 0 to 10.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货