Overloaded Constructor Problem

Nov 18 2004 11:59 AM
I am having a problem compiling code that instantiates a common custom object (CommonClass) with an overloaded constructor. One of the available constructors takes a custom object as an input parameter (SomeObject). The problem is that when I try to compile code that uses the CommonClass, but does not have a reference to the dll for the SomeObject, I get a compile error stating that a reference is missing, even when the application is not using the constructor with the the SomeObject input parameter. I am new to C#. Is there some modifier I am missing which will allow apps to use my CommonClass without having a reference to the SomeObject dll? When I build the solution for the application the SomeObject dll is copied down to the bin folder, which does not present a problem, I just do not want the users of my CommonObject to have to set a reference to the SomeObject when they have no intention of using it. //Call CommonClass oCommonClass = new CommonClass(); //Common Constructors public CommonClass() : base() { } public CommonClass(SomeObject object) : base() { }

Answers (6)