Professional ASP.NET 1.1 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Professional ASP.NET 1.1 [Electronic resources] - نسخه متنی

Alex Homeret

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Use Option Explicit or Strict in Visual Basic

Early binding provides much better performance than late binding. To ensure that only early binding is used, always include the

Option Explicit statement in code to force variables to be pre-declared. By default, ASP.NET pages are automatically compiled with the equivalent to

Option Explicit set.

Also, always specify a data type for variables when they are declared. This provides strong typing of variables for best performance. For example, use:


Dim intThis As Integer


Rather than:


Dim intThis


As a comparison, failing to declare variable types and therefore forcing late binding can lead to performance that is about the same as using VBScript in ASP 3.0.

It's also worth using

Option Strict where possible to enforce strict variable typing. This means that variables must be explicitly cast to the correct data type for each operation that requires a type conversion. Again, it can provide better performance, though it does involve more code and so may not always be appropriate. In ASP.NET,

Strict compilation is enabled using:


<%@ Page Language="VB" Strict="true" %>


/ 244