D
Demosthenes
I think what is happening here is that the string length is being reported
as the size of memory needed to store the string.
'code in my thread
Dim inData As String = "hello world"
Dim dlg As New ShowReceiveDataDelegate(AddressOf populate_grid) 'instantiate
delegate
Dim args() As Object = {inData} 'put the received string into an object for
the delegate
Me.Invoke(dlg, args) 'execute the delegate on the parent of this thread
(Form1)
Private Delegate Sub ShowReceiveDataDelegate(ByVal Data As String)
Private Sub populate_grid(ByVal net_data As String)
Dim thing As Int32 = len(net_data) 'this gives me a number like 32558
I have tried several things like copying the string to local variables and
such but the string always reports a crazy length. Also after operating on
the string and making it blank, even when the string = "" in the debugger,
my if statement does not see it as "".
If net_data = "" Then net_data never ever passes this test even when it
is ""
rows_flag = False
flag = "stop"
End If
as the size of memory needed to store the string.
'code in my thread
Dim inData As String = "hello world"
Dim dlg As New ShowReceiveDataDelegate(AddressOf populate_grid) 'instantiate
delegate
Dim args() As Object = {inData} 'put the received string into an object for
the delegate
Me.Invoke(dlg, args) 'execute the delegate on the parent of this thread
(Form1)
Private Delegate Sub ShowReceiveDataDelegate(ByVal Data As String)
Private Sub populate_grid(ByVal net_data As String)
Dim thing As Int32 = len(net_data) 'this gives me a number like 32558
I have tried several things like copying the string to local variables and
such but the string always reports a crazy length. Also after operating on
the string and making it blank, even when the string = "" in the debugger,
my if statement does not see it as "".
If net_data = "" Then net_data never ever passes this test even when it
is ""
rows_flag = False
flag = "stop"
End If