T
Tom_Slycke
In a VB.Net class and have pointed out a discrepancy to my teacher. Can
anyone here answer this?
Very simple program used to demonstrate the "ByRef" parameter passing.
If the ByRef truly refers to the variable location, I would have expected
the textbox1.text display to update right when the value change when NAME is
set to "Samantha" but the textbox1.text field does not reflect the change
until the subroutine completes.
I tried inserting a textbox1.refresh after the NAME is set to "Samantha",
but the textbox1.text still did not change to Samantha until the subroutine
completed.
-----------------------------------------
the subroutine called by
DisplayIT( Textbox1.text )
The routine is.....
public sub DisplayIT(byref name as string)
..
message box is used to display the contents of text1box.text ( origonal
contents )
..
name = "Samantha"
..
messagebox is used to display the contents of textbox1.text (
"Samantha" )
..
end sub
------------------------------
anyone here answer this?
Very simple program used to demonstrate the "ByRef" parameter passing.
If the ByRef truly refers to the variable location, I would have expected
the textbox1.text display to update right when the value change when NAME is
set to "Samantha" but the textbox1.text field does not reflect the change
until the subroutine completes.
I tried inserting a textbox1.refresh after the NAME is set to "Samantha",
but the textbox1.text still did not change to Samantha until the subroutine
completed.
-----------------------------------------
the subroutine called by
DisplayIT( Textbox1.text )
The routine is.....
public sub DisplayIT(byref name as string)
..
message box is used to display the contents of text1box.text ( origonal
contents )
..
name = "Samantha"
..
messagebox is used to display the contents of textbox1.text (
"Samantha" )
..
end sub
------------------------------