c# - Send Object as parameter to Dll function -
i have class library (dll) holds operations reports. dll needs object fill desired report.
the problem can't convert object main .exe same object in dll.
[a]mymainexe.model.myobject can't converted [b]myclasslibrary.model.myobject type cames 'mymainexe', version=1.0.0.0, culture=neutral, publickeytoken=null' in context 'default' @ 'c:\fakepath\dummyname.exe'. type b cames 'myclasslibrary', version=1.0.0.0, culture=neutral, publickeytoken=null' in context 'default' @ 'c:\fakepath\dummyname.dll'
i'm trying pass this:
doworks(myobjectname);
and receive this:
public void doworks(object myobject) { myobject thing = (myobject) myobject; //do }
i know how pass using array
or list
why can't objects?/what doing wrong?
since both objects of same name different namespace, think have serialize/deserialize object mymainexe.model.myobject xml/binary myclasslibrary.model.myobject
Comments
Post a Comment