Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Set a custom object's value using reflection

$
0
0

Hi

i have an application that uses a dll and executes the methods inside the dll

inside the dll i have 

public class DllObject
{
   UnknownType custObj;
   public void UseCustObj()
   {
      Send(custObj);
   }
}

public class UnknownType
{
    public string name;
    public string address;
}
Now using reflection i need to set the value of custObj. UnknownType is not known to the executing assembly thus i cant declare an instance of UnknownType and set it to custObj. Any suggestions?


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>