Todd Miller

Todd Miller

  • NA
  • 3
  • 1.3k

Access Data from Delegate.Target

Oct 18 2018 1:54 PM
I have this code.
 
var result = _getCambioData(DocumentId.Of(new Guid(documentid)));
object target = result.Target;
if(target != null)
{
   foreach (var field in target.GetType().GetFields())
   {
      Console.WriteLine("{0}={1}", field.Name, field.GetValue(target));
   }
}
 
and this is what it looks like when stepping through and looking inside the "result" value.
 
 
 
 
 
 
I am trying to acces the values in the DCATS.Data.Cambio which is a class. So basically I am trying to get access to the field names and values. I thought the above code would do that, but it seems to not be working. Can anyone take a look and advise. 

Answers (1)