G
Guest
I have 2 windows forms. In the first form I have a reference to an object. I
want to assign an object to that reference from the second form. If I pass
this reference to the new(...) method of the second form ByRef, I can easily
assign an object to the reference in the first form, as long as I do it in
the new(...) method.
However, I don't want to make this assignment in the constructor of the
second form. So I thought that I would create a second reference(of the same
type as the first) in the second form and assign the reference passed from
the first form to this reference in the second form. I would then try to
assign an object to the reference in the second form, hoping that it would in
effect be changing what the reference in the first form was pointing to. (In
my C days this was getting a pointer to a pointer).
But it doesn't work as expected. I can't make the reference from the first
form point to an object that I've assigned to the reference in the second
form, even though I assigned one reference to the other in the new(...)
method, which took the first reference ByRef in the constructors parameter
list.
Is there a way in VB .NET to create a reference to a reference so that I can
delay assignment of an object to a reference passed ByRef from the new(...)
to a different place in the second form?
Michael
want to assign an object to that reference from the second form. If I pass
this reference to the new(...) method of the second form ByRef, I can easily
assign an object to the reference in the first form, as long as I do it in
the new(...) method.
However, I don't want to make this assignment in the constructor of the
second form. So I thought that I would create a second reference(of the same
type as the first) in the second form and assign the reference passed from
the first form to this reference in the second form. I would then try to
assign an object to the reference in the second form, hoping that it would in
effect be changing what the reference in the first form was pointing to. (In
my C days this was getting a pointer to a pointer).
But it doesn't work as expected. I can't make the reference from the first
form point to an object that I've assigned to the reference in the second
form, even though I assigned one reference to the other in the new(...)
method, which took the first reference ByRef in the constructors parameter
list.
Is there a way in VB .NET to create a reference to a reference so that I can
delay assignment of an object to a reference passed ByRef from the new(...)
to a different place in the second form?
Michael