abstract - Force cast imported class in C# -
i have imported assembly in project, , want pass object defined within imported assembly. want manually construct each member of object, members read-only , not have constructor, can't seem instantiate derived object.
the imported class defined this
public class foo { public int num { get; } public string name { get; } } i used formatterservices.getuninitializedobject, feel it's start. perhaps there's way programmatically serialize?
is there way of instantiating , passing safely?
Comments
Post a Comment