Error: Option strict disallows late binding

A

Adotek

Hi All,

I've just converted a solution from .Net v1.1 to v2.0, by allowing
Visual Studio 2005 to do the conversion.

Since doing so, I am getting a compilation error as follows:

"Option Strict On disallows late binding."

This references line 1, which is my page directive:

<%@ Page Language="vb" AutoEventWireup="false" Inherits="perf_man.sbp3"
Trace="True" CodeFile="sbp3.aspx.vb" %>

Any ideas?

Thanks!
Simon.
 
B

Bruno Alexandre

it refers to line one because it cames from sbp3.aspx.vb file and that file
is in line 1

so the problem is inside that file

Late Binding means a lot of things, for example using arrays (like old vb6)

dim a as array
a = split( myString, " ")

if you use

something = a(0)

you will get that error, because you are binding the index 0 of the array
after seting it up, I know it's crazy, but now I understand the concept
under vb.net 2.0 (after long hours searching for an answer)

late binding means also like:

dim myObject

myObject = new String

you are binding the myObject as a String after you set it.


you need to look to your code and see what in the code could be wrong, if
you use strict on on that .vb file and if you are using Visual Studio 2005
it will point out the error in Warnings/Errors in the Error List menu (Ctrl
+ E)

--

Bruno Alexandre
København, Danmark

"a portuguese in Denmark"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top