Late Binding

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

    #1

    Late Binding

    How do I do this:

    Dim objControls As New Object



    ' Receiving

    objControls.Add (txtReceivingTe ch) ' 0

    objControls.Add (txtReceiving) ' 1



    ' Chemistry

    objControls.Add (txtNote) '2

    objControls.Add (txtSi) '3

    objControls.Add (txtFe) '4

    objControls.Add (txtCu) '5

    objControls.Add (txtMn) '6

    objControls.Add (txtMg) '7

    objControls.Add (txtCr) '8

    objControls.Add (txtZn) '9

    objControls.Add (txtTi) '10

    objControls.Add (txtChemTech) '11



    Without getting late binding errors with option strict on?

    Thanks!



    Usarian



  • Chris

    #2
    Re: Late Binding

    Usarian Skiff wrote:[color=blue]
    > How do I do this:
    >
    >
    > Dim objControls As New Object
    >
    >
    >
    > ' Receiving
    >
    > objControls.Add (txtReceivingTe ch) ' 0
    >
    > objControls.Add (txtReceiving) ' 1
    >
    >
    >
    > ' Chemistry
    >
    > objControls.Add (txtNote) '2
    >
    > objControls.Add (txtSi) '3
    >
    > objControls.Add (txtFe) '4
    >
    > objControls.Add (txtCu) '5
    >
    > objControls.Add (txtMn) '6
    >
    > objControls.Add (txtMg) '7
    >
    > objControls.Add (txtCr) '8
    >
    > objControls.Add (txtZn) '9
    >
    > objControls.Add (txtTi) '10
    >
    > objControls.Add (txtChemTech) '11
    >
    >
    >
    > Without getting late binding errors with option strict on?
    >
    > Thanks!
    >
    >
    >
    > Usarian
    >
    >
    >[/color]

    Dim objControls As New Object
    You get late binding on this line right? Are you just trying to have an
    array of objects here? Trying using an ArrayList
    Dim objControls As New ArrayList

    Comment

    • Dragon

      #3
      Re: Late Binding

      You may look at methods that appear when you use late binding with
      Option Strict Off, i.e.
      Microsoft.Visua lBasic.Compiler Services.LateBi nding methods.

      I hope it helps,
      Roman


      Comment

      • Cor Ligthert [MVP]

        #4
        Re: Late Binding

        Usarian,

        The most simple solution, try never to use the base class "Object" if it is
        not absolute necessary.

        I hope this helps,

        Cor


        Comment

        Working...