Consuming class build using CodeDom

G

Guest

I want the assembly that builds a class using CodeDom to also consume it (or,
more correctly, for a referenced assembly to consume it). Is there any way to
do this without using late binding?

Thx

Helen
 
D

Dmytro Lapshyn [MVP]

Hi,

If the public interface (the contract) of the class is known beforehand,
build the class in such way that it implements this predefined interface.
Thus, the assembly that needs to consume the class' functionality, can
downcast the reference of type "object" to the said interface and voila! -
no late binding.
 
G

Guest

Unfortunately the class has one method that can't implement an interface. I
tried.

thx

Helen
--
Helen Warn, PhD
Agile Software Inc.
www.agile-soft.com


Dmytro Lapshyn said:
Hi,

If the public interface (the contract) of the class is known beforehand,
build the class in such way that it implements this predefined interface.
Thus, the assembly that needs to consume the class' functionality, can
downcast the reference of type "object" to the said interface and voila! -
no late binding.
 

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