Late Binding

  • Thread starter Thread starter Usarian Skiff
  • Start date Start date
U

Usarian Skiff

How do I do this:

Dim objControls As New Object



' Receiving

objControls.Add(txtReceivingTech) ' 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
 
Usarian said:
How do I do this:


Dim objControls As New Object



' Receiving

objControls.Add(txtReceivingTech) ' 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

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
 
You may look at methods that appear when you use late binding with
Option Strict Off, i.e.
Microsoft.VisualBasic.CompilerServices.LateBinding methods.

I hope it helps,
Roman
 
Usarian,

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

I hope this helps,

Cor
 

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

Back
Top