Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

What do you mean by 'Option Strict On' ?

Option Strict

Visual Basic language in general does not require explicit syntax to be used when performing operations that might not be optimally efficient (e.g. late binding) or that might fail at run time (e.g. narrowing conversions). This permissive semantics often prevents detection of coding errors and also affects the performance of the application.

VB.NET enables a programmer to enforce strict semantics by setting this option to "On". When used, this option should appear before any other code. This option can be set to "On" or "Off". If this statement is not specified, by default, it is set to "Off". Syntax: Option Strict [On / Off] When it is set to "On", it disallows any narrowing conversions to occur without an explicit cast operator, late binding and does not let the programmer omit "As" clause in the declaration statement. Since setting it to "On" requires explicit conversion, it also requires that the compiler be able to determine the type of each variable. Thus it is implied that Option Strict also means Option Explicit.

Visual Basic .NET allows implicit conversions of any data type to any other data type. However, data loss can occur if the value of one data type is converted to a data type with less precision or a smaller capacity. Setting this option to "On" ensures compile-time notification of these types of conversions so they may be avoided.

What is the difference between vb and vb.net ? 1) VB.net is object oriented. 2) VB.net supports exception handling. 3) VB.net is strongly typed. 4) VB. Net supports multithreading. 5) VB.net now has console applications VB: * object based language

* does not support inheritance * does not support for disconnected architechture * no interoperability function * no support for threading * no powerful exceptional handling mechanism * does not support console based applications How to insert row by row data in datagrid ? By seting Autogrid generate properity=false. How to work with repeater controls and give small example program ?

Option Strict On : Required that variables be of the same data type when they are added, compared, or combined.

If Off- Implicit conversion is allowed If On ? Implicit conversion is not allowed. you need to use system.convert e.g of Implicit conversion and Explicit conversion Dim I as short = 32638 Dim l as long L = I ?Implicit conversion L = convert.tolong(i) ? Explicit conversion

What do you mean by Garbage Collection in VB.net

Garbage collection is the mechanism to release memory from unused objects and components of the application.

Compare C# and Visual basic.NET?

NET Frame work includes two languages which are language to IL compilers and in this C# and VB.NET are provided. The importance and flexibility of these as better programming languages is still questionable. Visual basic has been updated and revised to make it object oriented whereas C# has concepts from many languages such as Delphi, Java, etc and syntax from C and Java.

Describe about Visual basic.NET?

This is used in conjunction with Microsoft .NET platform and is a successor to visual basic sixth version. Visual basic is used in conjunction with.NET Framework. This tool has a serious defect it is not compatible with Microsoft visual basic sixth version. It has a huge library which assists programmers.

This is used in conjunction with Microsoft .NET platform and is a successor to visual basic sixth version. Visual basic is used in conjunction with.NET Framework. This tool has a serious defect it is not compatible with Microsoft visual basic sixth version. It has a huge library which assists programmers.

Posted by: dipankar

Contact dipankar

Visual Basic .NET, is an object-oriented computer programming language that can be viewed as an evolution of the classic Visual Basic (VB), which is implemented on the .NET Framework.
Differences between VB.Net and C#, related to OOPS concepts

VB.NET is a windows application Where as C# is a console

C# is case sensitive and vb.net is user friendly. C# application is compiled through csc compiler whereas Vb.net application is compiled through vbc compiler. C# supports delegates concept.Vb.net does not support it. C# 1.supports pointers,XML documentation,operator overloading 2.case sensitive

3.statements ends with ";" VB.Net 1.Doesn't support 2.not case sensitive 3.statement doesn't ends with ";" C# is case sensitive and vb.net is user friendly. C# application is compiled through csc compiler whereas Vb.net application is compiled through vbc compiler. C# supports delegates concept.Vb.net does not support it.

How to store and retrieve images in SQL server database through VB.NET?

You might also like