locked
Late-binding errors RRS feed

  • Question

  • User1988710134 posted

    I am trying to convert a vb.net project to vb.net project with Option Strict On and I am getting some late binding errors like this :

    Public ReadOnly Property HasAccessToPage(ByVal page_file As String) As Boolean
                Get
                    If USettings.GlobalAccessPages.Contains(page_file) Then Return True
                    Dim pagelist As List(Of String) = CType(Current.Session("pages_permissions"), List(Of String))
                    Dim pageArray As Array
    
                    For i = 0 To pagelist.Count - 1
                        pageArray = pagelist(i).Split(CChar("|"))
                        If pageArray(2) = page_file Then Return True
                    Next
                    Return False
                End Get
            End Property
    

    the error appears under pageArray(2).

    Any ideas?

    Thank you very much.

    Thursday, April 8, 2010 7:36 AM

Answers

  • User1988710134 posted

    I fixed most of the errors using the GetValue(index) method of an array!


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 8, 2010 9:30 AM

All replies

  • User-725075801 posted

    what does pageArray contain? integer? or string?

     

    try cstr(  pageArray(2)) = page_file 

    Thursday, April 8, 2010 9:13 AM
  • User1988710134 posted

    I fixed most of the errors using the GetValue(index) method of an array!


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 8, 2010 9:30 AM