lundi 10 juillet 2017

Access type from outside of a DLL

So I'm making a C# library library which is supposed to convert an object into a string and do stuff with it. Problem is, I cannot access the type of that object. The type is defined in the project in which the DLL will eventually be used, but I don't know how to access it.

I've only found Accessing types in another project from a DLL (C#).

Is there any other way besides letting the user handle the string convertion himself and just use a delegate like:

public void DoStuff(Object obj, Func convertToString) { string s = convertToString(Obj) }

I don't really want the user to do it on his down.





Aucun commentaire:

Enregistrer un commentaire