Circular referance and latebinding ...

  • Thread starter Thread starter Hakan ÖRNEK
  • Start date Start date
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
 
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.
 
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.
 
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.
 
<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.
 
Back
Top