I've two projects - one is an exe & the other is a dll. I add a reference of the dll project to the exe so that it can access dll project's types. Now in my dll project I've code which requires reference to the exe project; this is not possible as it would result in circular dependency. Hence all I'm doing is I'm passing exe's type say for example the MDIForm of the exe project to the dll project with datatype being Object. Now I can happily access all the MDIForm's members in the dll project.
My question:
- Is it okay to declare the MDIForm as Object datatype in the dll project?
- The disadvantage of using the Object datatype is that I cannot see its members while coding i.e. intellisense doesn't shows the MDIForm's members. Is there a way to typecast it to the exact type?
Thanks,
Aads