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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -