Late Binding

H

Hugh Janus

The following code give me an error telling that "The targeted version
of the .NET Compact Framework does not support latebinding." I am
using VB.Net 2005. What do I need to do to fix this code because I
have not seen this before!

The 2 parts giving the error are:

- PointsSplit(PointLoop)
- PointsSplit(PointLoop + 1))


For PointLoop As Integer = 0 To PointsSplit.GetUpperBound(0) - 1

Dim DiffFound As String = FetchDBValue("Difficulty",
PointsSplit(PointLoop) & "-" & PointsSplit(PointLoop + 1))

If DiffFound > DiffToCheck Then

DiffBool = False
Exit Function

ElseIf DiffFound <= DiffToCheck Then

DiffBool = True

End If

Next PointLoop
 
D

Daniel Moth

Make sure the types that the function accepts/returns are the same as the
ones you pass in. Explcitly cast or convert them.

The very first thing to do is turn Option Strict On and keep it on.

Cheers
Daniel
 

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

Top