I've got a function in VB like the following:
Public Overrides Sub FnName(param1 As ISomeInterface)
Dim TempVar As String = param1.prop1
End Sub
When I try to build the code in Visual Studio, I get the following error:
"prop1" is not a member of "param1".
However, when I add a breakpoint to the code and run the debugger, I can clearly see the param1
parameter under the Autos and Locals tabs, and when I expand it, I can see the prop1
property with a valid string value.
It should be noted that prop1
is not actually part of the ISomeInterface
interface, so I'm thinking that the property is being dynamically added to the parameter variable after the fact. (I'm very new to the codebase in question.)
Long story short, how do I access the string value stored in param1.prop1
without getting an error?
I am relatively new to VB, but no amount of Googling various keywords has netted me a valid page/topic. Thank you.