As new in VB. NET and unspecified type

Source: Internet
Author: User

It is often assumed that the parallel execution efficiency of VB. net programs is not as good as that of C #,Root Cause msdn statement, VB. NET and C # are both compiled into msil, so basically the same performance has been achieved by the two applications. The most common cause is that the two are in the Web application, and the performance is poor, in ASP, VBScript does not need to explicitly declare the "variant" and its "variant" parameter. Because in VB. NET/ASP. NET, the variation and reference type of AS is not specified, it will be an object, and this type is not the optimal type.

In VB. net explicitly uses the as to indicate whether the stereotypes can improve the efficiency. Because the time when the type is not pushed, it will advance from the primary time to the primary time, this prevents the source region from being "terminated late" due to negligence, and prevents the Common Language Runtime from being forced to perform type-specific checks and adult queries in the segment of the primary row.

In addition. dim var as New type > ()

This is the example of the following line:DimVaRAs <Differences> = New <Differences>()

Root Cause msdn statementMany VB 6 programmers do not use "as new" to declare changes and biological component instances, because this will reduce the efficiency in VB 6. However, in VB. NET, The as new pipeline method does not reduce the efficiency, so developers can use it as needed.

(In this article, the release date of the release blog is 2006/05/05)

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.