In Microsoft Visual Basic .NET, you can access dynamic properties by obtaining a PropertyObject reference from the specific object reference using the AsPropertyObject method on the object. You can then use the PropertyObject interface to access custom properties of the object using a lookup string to specify the specific custom property.

The following code uses the PropertyObject.GetValString method to obtain the error message value for the current step:

Private sub Example (StepObj as Step)

Dim PropertyObj as PropertyObject

Dim ErrorString as String

Set PropertyObj = StepObj.AsPropertyObject()

ErrorString = PropertyObj.GetValString("Result.Error.Msg",0)

End Sub