What is the advantage of option strict on?
Submitted by: AdministratorVisual Basic allows conversions of many data types to other data types. Data loss can occur when the value of one data type is converted to a data type with less precision or smaller capacity. A run-time error occurs if such a narrowing conversion fails. Option Strict ensures compile-time notification of these narrowing conversions so they can be avoided.
In addition to disallowing implicit narrowing conversions, Option Strict generates an error for late binding. An object is late bound when it is assigned to a variable that is declared to be of type Object.
Because Option Strict On provides strong typing, prevents unintended type conversions with data loss, disallows late binding, and improves performance, its use is strongly recommended.
What you can't do with Option Strict On, is accessing members of objects that are not declared as a specific object type. You must have a typed reference.
Submitted by: Administrator
In addition to disallowing implicit narrowing conversions, Option Strict generates an error for late binding. An object is late bound when it is assigned to a variable that is declared to be of type Object.
Because Option Strict On provides strong typing, prevents unintended type conversions with data loss, disallows late binding, and improves performance, its use is strongly recommended.
What you can't do with Option Strict On, is accessing members of objects that are not declared as a specific object type. You must have a typed reference.
Submitted by: Administrator
Read Online VB .Net Job Interview Questions And Answers
Top VB .Net Questions
☺ | What is difference between import System.Data.SqlClient,System.Data.Oledb? |
☺ | What does it meant to say "the canonical" form of XML? |
☺ | Differences between VB.Net and C#, related to OOPS concepts |
☺ | How to store and retrieve images in SQL server database through VB.NET? |
☺ | Which is the tool which can convert Visual basic old version to .NET compatibility version? |
Top Dot Net Technologies Categories
☺ | MSF Interview Questions. |
☺ | .Net Architecture Interview Questions. |
☺ | ASP.Net MVC Interview Questions. |
☺ | Entity Framework Interview Questions. |
☺ | C# (Sharp) Programming Language Interview Questions. |