Link to home
Start Free TrialLog in
Avatar of XK8ER
XK8ERFlag for United States of America

asked on

converted code function

hello there,
I have converted this function from c# into vb.net but for some reason I get an error on the "new Thread"
saying "Error      1      Syntax error."
how can I get it right?


        public void Decode(DecodeDelegate callback, byte[] img, int timeout)
        {
            DecodePayload payload = new DecodePayload();
            payload.Callback = callback;
            payload.Image = img;
            payload.Timeout = timeout;
            new Thread(DecodeWithCallback).Start(payload);
        }

Open in new window

into
		Public Sub Decode(callback As DecodeDelegate, img As Byte(), timeout As Integer)
			Dim payload As New DecodePayload()
			payload.Callback = callback
			payload.Image = img
			payload.Timeout = timeout
			New Thread(AddressOf DecodeWithCallback).Start(payload)
		End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of KBerger
KBerger

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial