Circular referance and latebinding ...

H

Hakan ÖRNEK

Hi,
I have two dll's like First.dll and Second.dll compiled by vb.net, a object
in first.dll and, b object in Second.dll.
I need hold cross referances;
a.breferance=b and
b.areferance=a
I know this is a circular referance, but I solved this case with latebinding
in VB6.
I can not create late binding with Createobject("....") function in VB.NET
2005. I think so this function using for com objects. How can I create
latebindig objects....
Or any idea for cross referances(circular referance)...
Thanks for all helps...

Hakan
 
T

Tom Shelton

Hi,
I have two dll's like First.dll and Second.dll compiled by vb.net, a object
in first.dll and, b object in Second.dll.
I need hold cross referances;
a.breferance=b and
b.areferance=a
I know this is a circular referance, but I solved this case with latebinding
in VB6.
I can not create late binding with Createobject("....") function in VB.NET
2005. I think so this function using for com objects. How can I create
latebindig objects....
Or any idea for cross referances(circular referance)...
Thanks for all helps...

Hakan

Assembly.LoadFrom
Activator.CreateInstance
etc.
 
H

Hakan ÖRNEK

Hi Tom,
Thanks for help. I 'll try "Assembly.LoadFrom"+"Activator.CreateInstance" .
Thanks again..

Hakan


Hi,
I have two dll's like First.dll and Second.dll compiled by vb.net, a object
in first.dll and, b object in Second.dll.
I need hold cross referances;
a.breferance=b and
b.areferance=a
I know this is a circular referance, but I solved this case with latebinding
in VB6.
I can not create late binding with Createobject("....") function in VB.NET
2005. I think so this function using for com objects. How can I create
latebindig objects....
Or any idea for cross referances(circular referance)...
Thanks for all helps...

Hakan

Assembly.LoadFrom
Activator.CreateInstance
etc.
 
B

Branco Medeiros

Hakan said:
I have two dll's like First.dll and Second.dll compiled by vb.net, a object
in first.dll and, b object in Second.dll.
I need hold cross referances;
a.breferance=b and
b.areferance=a
I know this is a circular referance, but I solved this case with latebinding
in VB6.
<snip>

Yes, this used to be a problem in VB.Classic because of the way the
garbage collector worked (reference counting). The garbage collector
in .Net doesn't have such problem and you can freely and purposelly
cross-reference, cause everything will -- hopefully -- untangle in the
end.

Therefore, you can have:

a.breferance=b
b.areferance=a

without restraint.

HTH.

Regards,

Branco.
 
T

Tom Shelton

<snip>

Yes, this used to be a problem in VB.Classic because of the way the
garbage collector worked (reference counting). The garbage collector
in .Net doesn't have such problem and you can freely and purposelly
cross-reference, cause everything will -- hopefully -- untangle in the
end.

Therefore, you can have:

a.breferance=b
b.areferance=a

without restraint.

HTH.

Regards,

Branco.

That is true... I was assuming he meant circular assembly references
and was going to use late binding to avoid them.

assembly a requires typeinfo from assembly b because class a has a
reference to class b.
assembly b requires typeinfo from assembly a because class b has a
reference to class a.
 

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