Inside Visual Studio.NET (6) _ Practical Tips

Source: Internet
Author: User
Tags bitwise bitwise operators variable scope
changes in Visual Basic

Characteristics
Describe

Bur and bitwise operators
And, or, Xor, and not are strict Boolean operators and can no longer be used for bitwise operations
。 Instead, you should use Bitand, Bitor, Bitxor, and Bitnot. Eqv and IMP are no longer supported.

Data type
Deftype statements (DefBool, DefByte, and so on) are no longer supported. The Currency type is replaced by the decimal type. Dates is now stored as a 8-byte integer to match the CLR DateTime type.

Dim, ReDim
You cannot use ReDim in the initial array declaration. You must first declare this array in dim. You can then use ReDim to change the size of the array.

Integer
Short refers to a 16-bit signed integer. Integer (type string is%) Refers to a 32-bit signed integer. A Long (type string of &) refers to a 64-bit signed integer.

String
The string type now corresponds to the. NET Framework string class and cannot be modified after initialization. If this string must be modified, you can use the StringBuilder class.

Variable scope
The scope of a variable declared in a program block is a program block rather than an entire process. The scope of a variable declared in a procedure rather than in a program block (a program block that is a group of statements ended by end, Loop, or next) is the entire process.

Variants variable
The variant is already replaced by object. But the variant is still the key word in this language.

Visual Basic. The elements of Visual Basic 6.0 that are no longer supported in net.

As any, Atn, Calendar, Circle, Currency, Date, date$, Debug.Assert, Debug.Print, Deftype, DoEvents, Empty, Eqv, GoSub, IMP , Initialize, instancing, IsEmpty, IsMissing, IsNull, IsObject, let, line, LSet, MsgBox, now, Null, on ... GoSub, on ... GoTo, option Base, option Private Module, Property Get, Property Let, property Set, PSet, Rnd, Round, RSet, Scale, Set, Sg N, SQR, String, Terminate, Time, time$, Timer, Variant, VarType, Wend.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.