Late Binding Issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Miro

    #1

    Late Binding Issue

    VB 2003 and Im still new to vb, so i hope i can explain this as best I can.

    I have a variable defined as such: ( simple example )

    Dim AVariableOfSort s(,) As Object = _
    { _
    {"Last", "String", 20}, _
    {"First", "String", 20} _
    }


    I had to define it as an object so I can have different variable types all
    within the same array.
    ( unless there is another way to do this )

    What im getting is an error "Option Strict On Disallows Late Binding" when
    I try to do anything with an array element.

    For example
    AVariableOfSort s(1, 1) = ""

    I would like to keep Strict On on

    What am I missing ? or how do I get around this issue?

    I beleive I know the difference between binding. - Simply put:
    1. Dim X as String is early binding and Dim X as Object ,...
    X.GetType.ToStr ing would be late binding and would
    take longer during running.

    Im not sure what to search for in Help / or Online to help myself out.

    Thanks

    Miro



  • Herfried K. Wagner [MVP]

    #2
    Re: Late Binding Issue

    "Miro" <mironagy@golde n.netschrieb:
    VB 2003 and Im still new to vb, so i hope i can explain this as best I
    can.
    >
    I have a variable defined as such: ( simple example )
    >
    Dim AVariableOfSort s(,) As Object = _
    { _
    {"Last", "String", 20}, _
    {"First", "String", 20} _
    }
    >
    >
    I had to define it as an object so I can have different variable types all
    within the same array.
    ( unless there is another way to do this )
    >
    What im getting is an error "Option Strict On Disallows Late Binding"
    when I try to do anything with an array element.
    >
    For example
    AVariableOfSort s(1, 1) = ""
    >
    I would like to keep Strict On on
    \\\
    DirectCast(AVar iableOfSorts(1, 1), String) = ""
    ///
    What am I missing ? or how do I get around this issue?
    Maybe it's better to define a class with properties for the first and second
    string and the integer number. Then you can create an array of this type
    ('Dim Items() As Foo').

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

    Comment

    • rmacias

      #3
      RE: Late Binding Issue

      You can try using an ArrayList

      Dim listOfObjs As ArrayList = New ArrayList

      listOfObjs.Add( "Last")
      listOfObjs.Add( "String")
      listOfObjs.Add( "20")

      However, I like Herfried's idea better in creating a class for this
      information and then having an array (or a strongly typed collection) for
      them. It really depends on what you are trying to accomplish.

      "Miro" wrote:
      VB 2003 and Im still new to vb, so i hope i can explain this as best I can.
      >
      I have a variable defined as such: ( simple example )
      >
      Dim AVariableOfSort s(,) As Object = _
      { _
      {"Last", "String", 20}, _
      {"First", "String", 20} _
      }
      >
      >
      I had to define it as an object so I can have different variable types all
      within the same array.
      ( unless there is another way to do this )
      >
      What im getting is an error "Option Strict On Disallows Late Binding" when
      I try to do anything with an array element.
      >
      For example
      AVariableOfSort s(1, 1) = ""
      >
      I would like to keep Strict On on
      >
      What am I missing ? or how do I get around this issue?
      >
      I beleive I know the difference between binding. - Simply put:
      1. Dim X as String is early binding and Dim X as Object ,...
      X.GetType.ToStr ing would be late binding and would
      take longer during running.
      >
      Im not sure what to search for in Help / or Online to help myself out.
      >
      Thanks
      >
      Miro
      >
      >
      >
      >

      Comment

      • tommaso.gastaldi@uniroma1.it

        #4
        Re: Late Binding Issue

        Yes Herfried is right. Go for a class anc collections. Forget about
        bidimensional arrays of objects. I have never seen them in a meaningul
        ..net program.

        tommaso

        rmacias ha scritto:
        You can try using an ArrayList
        >
        Dim listOfObjs As ArrayList = New ArrayList
        >
        listOfObjs.Add( "Last")
        listOfObjs.Add( "String")
        listOfObjs.Add( "20")
        >
        However, I like Herfried's idea better in creating a class for this
        information and then having an array (or a strongly typed collection) for
        them. It really depends on what you are trying to accomplish.
        >
        "Miro" wrote:
        >
        VB 2003 and Im still new to vb, so i hope i can explain this as best I can.

        I have a variable defined as such: ( simple example )

        Dim AVariableOfSort s(,) As Object = _
        { _
        {"Last", "String", 20}, _
        {"First", "String", 20} _
        }


        I had to define it as an object so I can have different variable types all
        within the same array.
        ( unless there is another way to do this )

        What im getting is an error "Option Strict On Disallows Late Binding" when
        I try to do anything with an array element.

        For example
        AVariableOfSort s(1, 1) = ""

        I would like to keep Strict On on

        What am I missing ? or how do I get around this issue?

        I beleive I know the difference between binding. - Simply put:
        1. Dim X as String is early binding and Dim X as Object ,...
        X.GetType.ToStr ing would be late binding and would
        take longer during running.

        Im not sure what to search for in Help / or Online to help myself out.

        Thanks

        Miro


        Comment

        • Miro

          #5
          Re: Late Binding Issue

          Ive never used classes in the programming languages ive used.

          So that is my next lesson.
          I stayed away from the array lists cause I didnt like how all the items have
          to be the same "var type "

          I just want to store a whole bunch of data in 1 variable with many different
          vartypes and change the
          variable elements as i need to.

          Someone once pointed me on this newgroup to the object, so now im at the
          point to use the "object" var
          i created and im running into this.

          So a class it will be - as long as i can achieve the above posted.
          I can always make something like "dim bla(,) as String" and strigify
          everything and val it as i need to cause i know
          which elements are going to be numeric.
          I just didnt think it would be this hard to store different variable types
          / variables all in one array.

          So im off to read about classes .... my next post might be about them :)

          Thanks.

          <tommaso.gastal di@uniroma1.itw rote in message
          news:1155928323 .990675.126610@ m79g2000cwm.goo glegroups.com.. .
          Yes Herfried is right. Go for a class anc collections. Forget about
          bidimensional arrays of objects. I have never seen them in a meaningul
          .net program.
          >
          tommaso
          >
          rmacias ha scritto:
          >
          >You can try using an ArrayList
          >>
          >Dim listOfObjs As ArrayList = New ArrayList
          >>
          >listOfObjs.Add ("Last")
          >listOfObjs.Add ("String")
          >listOfObjs.Add ("20")
          >>
          >However, I like Herfried's idea better in creating a class for this
          >information and then having an array (or a strongly typed collection) for
          >them. It really depends on what you are trying to accomplish.
          >>
          >"Miro" wrote:
          >>
          VB 2003 and Im still new to vb, so i hope i can explain this as best I
          can.
          >
          I have a variable defined as such: ( simple example )
          >
          Dim AVariableOfSort s(,) As Object = _
          { _
          {"Last", "String", 20}, _
          {"First", "String", 20} _
          }
          >
          >
          I had to define it as an object so I can have different variable types
          all
          within the same array.
          ( unless there is another way to do this )
          >
          What im getting is an error "Option Strict On Disallows Late Binding"
          when
          I try to do anything with an array element.
          >
          For example
          AVariableOfSort s(1, 1) = ""
          >
          I would like to keep Strict On on
          >
          What am I missing ? or how do I get around this issue?
          >
          I beleive I know the difference between binding. - Simply put:
          1. Dim X as String is early binding and Dim X as Object ,...
          X.GetType.ToStr ing would be late binding and would
          take longer during running.
          >
          Im not sure what to search for in Help / or Online to help myself out.
          >
          Thanks
          >
          Miro
          >
          >
          >
          >
          >

          Comment

          • tommaso.gastaldi@uniroma1.it

            #6
            Re: Late Binding Issue - almost OT

            Hi Miro. This is not a poetry.

            Classes must be your breath.

            Arraylist, Hashtable, Sorted List,
            your father, mother and brother.

            Comparers your best friends ...

            Anyone wants to add more lines ? :)

            Tommaso


            Miro ha scritto:
            Ive never used classes in the programming languages ive used.
            >
            So that is my next lesson.
            I stayed away from the array lists cause I didnt like how all the items have
            to be the same "var type "
            >
            I just want to store a whole bunch of data in 1 variable with many different
            vartypes and change the
            variable elements as i need to.
            >
            Someone once pointed me on this newgroup to the object, so now im at the
            point to use the "object" var
            i created and im running into this.
            >
            So a class it will be - as long as i can achieve the above posted.
            I can always make something like "dim bla(,) as String" and strigify
            everything and val it as i need to cause i know
            which elements are going to be numeric.
            I just didnt think it would be this hard to store different variable types
            / variables all in one array.
            >
            So im off to read about classes .... my next post might be about them :)
            >
            Thanks.
            >
            <tommaso.gastal di@uniroma1.itw rote in message
            news:1155928323 .990675.126610@ m79g2000cwm.goo glegroups.com.. .
            Yes Herfried is right. Go for a class anc collections. Forget about
            bidimensional arrays of objects. I have never seen them in a meaningul
            .net program.

            tommaso

            rmacias ha scritto:
            You can try using an ArrayList
            >
            Dim listOfObjs As ArrayList = New ArrayList
            >
            listOfObjs.Add( "Last")
            listOfObjs.Add( "String")
            listOfObjs.Add( "20")
            >
            However, I like Herfried's idea better in creating a class for this
            information and then having an array (or a strongly typed collection) for
            them. It really depends on what you are trying to accomplish.
            >
            "Miro" wrote:
            >
            VB 2003 and Im still new to vb, so i hope i can explain this as best I
            can.

            I have a variable defined as such: ( simple example )

            Dim AVariableOfSort s(,) As Object = _
            { _
            {"Last", "String", 20}, _
            {"First", "String", 20} _
            }


            I had to define it as an object so I can have different variable types
            all
            within the same array.
            ( unless there is another way to do this )

            What im getting is an error "Option Strict On Disallows Late Binding"
            when
            I try to do anything with an array element.

            For example
            AVariableOfSort s(1, 1) = ""

            I would like to keep Strict On on

            What am I missing ? or how do I get around this issue?

            I beleive I know the difference between binding. - Simply put:
            1. Dim X as String is early binding and Dim X as Object ,...
            X.GetType.ToStr ing would be late binding and would
            take longer during running.

            Im not sure what to search for in Help / or Online to help myself out.

            Thanks

            Miro


            Comment

            • Miro

              #7
              Re: Late Binding Issue - almost OT

              Believe it or not they arent the easiest thing to grasp.

              In theory or on a page or in a book they are fine... but i tell ya
              some old languages ive used far too long probably look just as confusing
              back.

              I will breath Classes this weekend,
              and most likely have some questions.

              Comparers and friends are still not all that clear either.

              M.

              <tommaso.gastal di@uniroma1.itw rote in message
              news:1155934885 .178189.43900@i 3g2000cwc.googl egroups.com...
              Hi Miro. This is not a poetry.
              >
              Classes must be your breath.
              >
              Arraylist, Hashtable, Sorted List,
              your father, mother and brother.
              >
              Comparers your best friends ...
              >
              Anyone wants to add more lines ? :)
              >
              Tommaso
              >
              >
              Miro ha scritto:
              >
              >Ive never used classes in the programming languages ive used.
              >>
              >So that is my next lesson.
              >I stayed away from the array lists cause I didnt like how all the items
              >have
              >to be the same "var type "
              >>
              >I just want to store a whole bunch of data in 1 variable with many
              >different
              >vartypes and change the
              >variable elements as i need to.
              >>
              >Someone once pointed me on this newgroup to the object, so now im at the
              >point to use the "object" var
              >i created and im running into this.
              >>
              >So a class it will be - as long as i can achieve the above posted.
              >I can always make something like "dim bla(,) as String" and strigify
              >everything and val it as i need to cause i know
              >which elements are going to be numeric.
              >I just didnt think it would be this hard to store different variable
              >types
              >/ variables all in one array.
              >>
              >So im off to read about classes .... my next post might be about them :)
              >>
              >Thanks.
              >>
              ><tommaso.gasta ldi@uniroma1.it wrote in message
              >news:115592832 3.990675.126610 @m79g2000cwm.go oglegroups.com. ..
              Yes Herfried is right. Go for a class anc collections. Forget about
              bidimensional arrays of objects. I have never seen them in a meaningul
              .net program.
              >
              tommaso
              >
              rmacias ha scritto:
              >
              >You can try using an ArrayList
              >>
              >Dim listOfObjs As ArrayList = New ArrayList
              >>
              >listOfObjs.Add ("Last")
              >listOfObjs.Add ("String")
              >listOfObjs.Add ("20")
              >>
              >However, I like Herfried's idea better in creating a class for this
              >information and then having an array (or a strongly typed collection)
              >for
              >them. It really depends on what you are trying to accomplish.
              >>
              >"Miro" wrote:
              >>
              VB 2003 and Im still new to vb, so i hope i can explain this as best
              I
              can.
              >
              I have a variable defined as such: ( simple example )
              >
              Dim AVariableOfSort s(,) As Object = _
              { _
              {"Last", "String", 20}, _
              {"First", "String", 20} _
              }
              >
              >
              I had to define it as an object so I can have different variable
              types
              all
              within the same array.
              ( unless there is another way to do this )
              >
              What im getting is an error "Option Strict On Disallows Late
              Binding"
              when
              I try to do anything with an array element.
              >
              For example
              AVariableOfSort s(1, 1) = ""
              >
              I would like to keep Strict On on
              >
              What am I missing ? or how do I get around this issue?
              >
              I beleive I know the difference between binding. - Simply put:
              1. Dim X as String is early binding and Dim X as Object ,...
              X.GetType.ToStr ing would be late binding and would
              take longer during running.
              >
              Im not sure what to search for in Help / or Online to help myself
              out.
              >
              Thanks
              >
              Miro
              >
              >
              >
              >
              >
              >

              Comment

              • Cor Ligthert [MVP]

                #8
                Re: Late Binding Issue

                Miro,

                Reading your message is the answer, you should not use a programming
                language as VB.Net, C#, C++ or Java.

                Just keep it by VB script or JavaScript.

                Just my thought reading your message.

                Cor

                "Miro" <mironagy@golde n.netschreef in bericht
                news:Ols$UcwwGH A.5068@TK2MSFTN GP02.phx.gbl...
                Ive never used classes in the programming languages ive used.
                >
                So that is my next lesson.
                I stayed away from the array lists cause I didnt like how all the items
                have to be the same "var type "
                >
                I just want to store a whole bunch of data in 1 variable with many
                different vartypes and change the
                variable elements as i need to.
                >
                Someone once pointed me on this newgroup to the object, so now im at the
                point to use the "object" var
                i created and im running into this.
                >
                So a class it will be - as long as i can achieve the above posted.
                I can always make something like "dim bla(,) as String" and strigify
                everything and val it as i need to cause i know
                which elements are going to be numeric.
                I just didnt think it would be this hard to store different variable
                types / variables all in one array.
                >
                So im off to read about classes .... my next post might be about them :)
                >
                Thanks.
                >
                <tommaso.gastal di@uniroma1.itw rote in message
                news:1155928323 .990675.126610@ m79g2000cwm.goo glegroups.com.. .
                >Yes Herfried is right. Go for a class anc collections. Forget about
                >bidimensiona l arrays of objects. I have never seen them in a meaningul
                >.net program.
                >>
                >tommaso
                >>
                >rmacias ha scritto:
                >>
                >>You can try using an ArrayList
                >>>
                >>Dim listOfObjs As ArrayList = New ArrayList
                >>>
                >>listOfObjs.Ad d("Last")
                >>listOfObjs.Ad d("String")
                >>listOfObjs.Ad d("20")
                >>>
                >>However, I like Herfried's idea better in creating a class for this
                >>information and then having an array (or a strongly typed collection)
                >>for
                >>them. It really depends on what you are trying to accomplish.
                >>>
                >>"Miro" wrote:
                >>>
                >VB 2003 and Im still new to vb, so i hope i can explain this as best I
                >can.
                >>
                >I have a variable defined as such: ( simple example )
                >>
                > Dim AVariableOfSort s(,) As Object = _
                > { _
                > {"Last", "String", 20}, _
                > {"First", "String", 20} _
                > }
                >>
                >>
                >I had to define it as an object so I can have different variable types
                >all
                >within the same array.
                >( unless there is another way to do this )
                >>
                >What im getting is an error "Option Strict On Disallows Late Binding"
                >when
                >I try to do anything with an array element.
                >>
                >For example
                >AVariableOfSor ts(1, 1) = ""
                >>
                >I would like to keep Strict On on
                >>
                >What am I missing ? or how do I get around this issue?
                >>
                >I beleive I know the difference between binding. - Simply put:
                >1. Dim X as String is early binding and Dim X as Object ,...
                >X.GetType.ToSt ring would be late binding and would
                >take longer during running.
                >>
                >Im not sure what to search for in Help / or Online to help myself out.
                >>
                >Thanks
                >>
                >Miro
                >>
                >>
                >>
                >>
                >>
                >
                >

                Comment

                • Miro

                  #9
                  Re: Late Binding Issue

                  I would like to do it all in VB.
                  Learn it all as one of you would actaully do it in vb.
                  I knew javascript pretty good back in 99' to about 2002 ... and then i
                  stopped using it. So Im not sure how much
                  it has changed since then.

                  Im fiddling with classes now and I can create a Class and property so im
                  close ( or i think im close ).
                  So Im assuming now that I can create property's when im all done I will have
                  1 Class with 3 properties that will be an array,
                  that will technically be each element of the array i was trying to create.

                  M.

                  ps...
                  Oh... Herfried K. Wagner... the
                  DirectCast(AVar iableOfSorts(1, 1), String) = "" didnt work, it had the same
                  issue with late binding or something.





                  "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
                  news:ex0KRF1wGH A.4752@TK2MSFTN GP02.phx.gbl...
                  Miro,
                  >
                  Reading your message is the answer, you should not use a programming
                  language as VB.Net, C#, C++ or Java.
                  >
                  Just keep it by VB script or JavaScript.
                  >
                  Just my thought reading your message.
                  >
                  Cor
                  >
                  "Miro" <mironagy@golde n.netschreef in bericht
                  news:Ols$UcwwGH A.5068@TK2MSFTN GP02.phx.gbl...
                  >Ive never used classes in the programming languages ive used.
                  >>
                  >So that is my next lesson.
                  >I stayed away from the array lists cause I didnt like how all the items
                  >have to be the same "var type "
                  >>
                  >I just want to store a whole bunch of data in 1 variable with many
                  >different vartypes and change the
                  >variable elements as i need to.
                  >>
                  >Someone once pointed me on this newgroup to the object, so now im at the
                  >point to use the "object" var
                  >i created and im running into this.
                  >>
                  >So a class it will be - as long as i can achieve the above posted.
                  >I can always make something like "dim bla(,) as String" and strigify
                  >everything and val it as i need to cause i know
                  >which elements are going to be numeric.
                  >I just didnt think it would be this hard to store different variable
                  >types / variables all in one array.
                  >>
                  >So im off to read about classes .... my next post might be about them :)
                  >>
                  >Thanks.
                  >>
                  ><tommaso.gasta ldi@uniroma1.it wrote in message
                  >news:115592832 3.990675.126610 @m79g2000cwm.go oglegroups.com. ..
                  >>Yes Herfried is right. Go for a class anc collections. Forget about
                  >>bidimension al arrays of objects. I have never seen them in a meaningul
                  >>.net program.
                  >>>
                  >>tommaso
                  >>>
                  >>rmacias ha scritto:
                  >>>
                  >>>You can try using an ArrayList
                  >>>>
                  >>>Dim listOfObjs As ArrayList = New ArrayList
                  >>>>
                  >>>listOfObjs.A dd("Last")
                  >>>listOfObjs.A dd("String")
                  >>>listOfObjs.A dd("20")
                  >>>>
                  >>>However, I like Herfried's idea better in creating a class for this
                  >>>informatio n and then having an array (or a strongly typed collection)
                  >>>for
                  >>>them. It really depends on what you are trying to accomplish.
                  >>>>
                  >>>"Miro" wrote:
                  >>>>
                  >>VB 2003 and Im still new to vb, so i hope i can explain this as best
                  >>I can.
                  >>>
                  >>I have a variable defined as such: ( simple example )
                  >>>
                  >> Dim AVariableOfSort s(,) As Object = _
                  >> { _
                  >> {"Last", "String", 20}, _
                  >> {"First", "String", 20} _
                  >> }
                  >>>
                  >>>
                  >>I had to define it as an object so I can have different variable
                  >>types all
                  >>within the same array.
                  >>( unless there is another way to do this )
                  >>>
                  >>What im getting is an error "Option Strict On Disallows Late
                  >>Binding" when
                  >>I try to do anything with an array element.
                  >>>
                  >>For example
                  >>AVariableOfSo rts(1, 1) = ""
                  >>>
                  >>I would like to keep Strict On on
                  >>>
                  >>What am I missing ? or how do I get around this issue?
                  >>>
                  >>I beleive I know the difference between binding. - Simply put:
                  >>1. Dim X as String is early binding and Dim X as Object ,...
                  >>X.GetType.ToS tring would be late binding and would
                  >>take longer during running.
                  >>>
                  >>Im not sure what to search for in Help / or Online to help myself
                  >>out.
                  >>>
                  >>Thanks
                  >>>
                  >>Miro
                  >>>
                  >>>
                  >>>
                  >>>
                  >>>
                  >>
                  >>
                  >
                  >

                  Comment

                  • Cor Ligthert [MVP]

                    #10
                    Re: Late Binding Issue

                    Miro,

                    If you create a class, something as

                    \\\
                    Public Class whatever
                    Private whatevervalue as string
                    Private whateelsevalue as string
                    Public property TheFirstValue as string
                    Get
                    return whatevervalue
                    End Get
                    Set (by value as string)
                    whatevervalue = value
                    end set
                    'The same for secondvalue
                    End Class
                    ///

                    Than you can do
                    Dim myArray as list of (whatever)

                    all typed in this message so watch typos or other errros.

                    I hope this helps,

                    cor


                    "Miro" <mironagy@golde n.netschreef in bericht
                    news:%23eaFf3ex GHA.428@TK2MSFT NGP03.phx.gbl.. .
                    >I would like to do it all in VB.
                    Learn it all as one of you would actaully do it in vb.
                    I knew javascript pretty good back in 99' to about 2002 ... and then i
                    stopped using it. So Im not sure how much
                    it has changed since then.
                    >
                    Im fiddling with classes now and I can create a Class and property so im
                    close ( or i think im close ).
                    So Im assuming now that I can create property's when im all done I will
                    have 1 Class with 3 properties that will be an array,
                    that will technically be each element of the array i was trying to create.
                    >
                    M.
                    >
                    ps...
                    Oh... Herfried K. Wagner... the
                    DirectCast(AVar iableOfSorts(1, 1), String) = "" didnt work, it had the
                    same issue with late binding or something.
                    >
                    >
                    >
                    >
                    >
                    "Cor Ligthert [MVP]" <notmyfirstname @planet.nlwrote in message
                    news:ex0KRF1wGH A.4752@TK2MSFTN GP02.phx.gbl...
                    >Miro,
                    >>
                    >Reading your message is the answer, you should not use a programming
                    >language as VB.Net, C#, C++ or Java.
                    >>
                    >Just keep it by VB script or JavaScript.
                    >>
                    >Just my thought reading your message.
                    >>
                    >Cor
                    >>
                    >"Miro" <mironagy@golde n.netschreef in bericht
                    >news:Ols$UcwwG HA.5068@TK2MSFT NGP02.phx.gbl.. .
                    >>Ive never used classes in the programming languages ive used.
                    >>>
                    >>So that is my next lesson.
                    >>I stayed away from the array lists cause I didnt like how all the items
                    >>have to be the same "var type "
                    >>>
                    >>I just want to store a whole bunch of data in 1 variable with many
                    >>different vartypes and change the
                    >>variable elements as i need to.
                    >>>
                    >>Someone once pointed me on this newgroup to the object, so now im at the
                    >>point to use the "object" var
                    >>i created and im running into this.
                    >>>
                    >>So a class it will be - as long as i can achieve the above posted.
                    >>I can always make something like "dim bla(,) as String" and strigify
                    >>everything and val it as i need to cause i know
                    >>which elements are going to be numeric.
                    >>I just didnt think it would be this hard to store different variable
                    >>types / variables all in one array.
                    >>>
                    >>So im off to read about classes .... my next post might be about them :)
                    >>>
                    >>Thanks.
                    >>>
                    >><tommaso.gast aldi@uniroma1.i twrote in message
                    >>news:11559283 23.990675.12661 0@m79g2000cwm.g ooglegroups.com ...
                    >>>Yes Herfried is right. Go for a class anc collections. Forget about
                    >>>bidimensiona l arrays of objects. I have never seen them in a meaningul
                    >>>.net program.
                    >>>>
                    >>>tommaso
                    >>>>
                    >>>rmacias ha scritto:
                    >>>>
                    >>>>You can try using an ArrayList
                    >>>>>
                    >>>>Dim listOfObjs As ArrayList = New ArrayList
                    >>>>>
                    >>>>listOfObjs. Add("Last")
                    >>>>listOfObjs. Add("String")
                    >>>>listOfObjs. Add("20")
                    >>>>>
                    >>>>However, I like Herfried's idea better in creating a class for this
                    >>>>informati on and then having an array (or a strongly typed collection)
                    >>>>for
                    >>>>them. It really depends on what you are trying to accomplish.
                    >>>>>
                    >>>>"Miro" wrote:
                    >>>>>
                    >>>VB 2003 and Im still new to vb, so i hope i can explain this as best
                    >>>I can.
                    >>>>
                    >>>I have a variable defined as such: ( simple example )
                    >>>>
                    >>> Dim AVariableOfSort s(,) As Object = _
                    >>> { _
                    >>> {"Last", "String", 20}, _
                    >>> {"First", "String", 20} _
                    >>> }
                    >>>>
                    >>>>
                    >>>I had to define it as an object so I can have different variable
                    >>>types all
                    >>>within the same array.
                    >>>( unless there is another way to do this )
                    >>>>
                    >>>What im getting is an error "Option Strict On Disallows Late
                    >>>Binding" when
                    >>>I try to do anything with an array element.
                    >>>>
                    >>>For example
                    >>>AVariableOfS orts(1, 1) = ""
                    >>>>
                    >>>I would like to keep Strict On on
                    >>>>
                    >>>What am I missing ? or how do I get around this issue?
                    >>>>
                    >>>I beleive I know the difference between binding. - Simply put:
                    >>>1. Dim X as String is early binding and Dim X as Object ,...
                    >>>X.GetType.To String would be late binding and would
                    >>>take longer during running.
                    >>>>
                    >>>Im not sure what to search for in Help / or Online to help myself
                    >>>out.
                    >>>>
                    >>>Thanks
                    >>>>
                    >>>Miro
                    >>>>
                    >>>>
                    >>>>
                    >>>>
                    >>>>
                    >>>
                    >>>
                    >>
                    >>
                    >
                    >

                    Comment

                    Working...