0

I want to access and get a property value by passing string name in my function... Something like this:

Property: pProperty How can i access the property: Matrix.Activity(Id).pProperty

My idea for Function: GetProperty(pField) Return Matrix.Activity(Id).pField

then when I try GetProperty("pProperty") it returns the value of Matrix.Activity(Id).pProperty

I know the way is do it by reflection but Im strugglying and getting nowhere

Thanks Stack <3

  • While this is definitely possible using Reflection, it's not something that you should need to do very often and something you should generally avoid if possible because it is very slow. Why exactly do you want to do this in the first place? There may well be a better way. – jmcilhinney Jan 07 '21 at 01:02
  • I got it done with CallByName function... Thanks @Fabio – Arthur Santana Jan 07 '21 at 19:19

0 Answers0