So I want a pointer to a pointer.
I've got a class that is updated in one object. In another object I want a reference to the current version of the object in the original Class. Here is sort of a simplified version of what I have going on.
Public Class Foo
'conaints information
End Class
Public Class myMainApp
Dim myHelper As HelperClass
Dim currentFoo As Foo
Private Sub init()
currentFoo = New Foo()
myHelper = New HelperClass(currentFoo)
End Sub
Private Sub UpdatingUI()
currentFoo = GetFooFromContext()
End Sub
Private Function GetFooFromContext() As Foo
Return New Foo()
End Function
End Class
Public Class HelperClass
Private myFoo As Foo
Public Sub New(ByVal aFoo As Foo)
myFoo = aFoo
End Sub
End Class
if thise was C++, currentFoo would be a Foo* and HelperClass's myFoo would be a Foo** so that whenever we updated currentFoo's refrence to a new object the HelperClass would also be accessing this new object.
Is there syntax to accomplish this in the .net world?