Home > Net >  The c # transformation into vb.net
The c # transformation into vb.net

Time:11-17

C #
Private void button10_Click (object sender, EventArgs e)
{
The StringBuilder data2=new StringBuilder ();
St=Class1. IC_Read (icdev, 0, 100, data2);
If (st!=0)
{
MessageBox. Show (" card read failure ");
return;
}
MessageBox. Show (" successfully read card, card number: "+ data2);
}


Vb.net
Private Sub Button3_Click (ByVal sender As System. Object, ByVal e the As System. EventArgs) Handles Button3. Click
Dim data2 As StringBuilder=New StringBuilder
St=Module1. IC_Read (icdev, 0, 100, data2)
If st & lt;> 0 Then
MessageBox. Show (" card read failure ")
The Else
MessageBox. Show (" successfully read card, card number: "& amp; Data2. ToString
End the If
End Sub

This is a used card reader to read the IC card code, running in c #, after conversion to vb.net to read out the content of the card, ask the teacher to help have a look at,

CodePudding user response:

MessageBox. Show (" card read failure ")
The Exit Sub 'plus

CodePudding user response:

Problem is not here didn't convert good or application need to new instantiated, or into a module embedded assignment

CodePudding user response:

Problem has been solved,
  • Related