Functions Defined by ASC and CHR systems are available in VB and are not available in C...
This is because the barcode needs to add a verification code and you need to use this conversion function.
CharacterTransferASCII code:
Public static int ASC (string character)
{
If (character. Length = 1)
{
System. Text. asciiencoding = new system. Text. asciiencoding ();
Int intasciicode = (INT) asciiencoding. getbytes (character) [0];
Return (intasciicode );
}
Else
{
Throw new exception ("character is not valid .");
}
}
ASCII code to character:
Public static string CHR (INT asciicode)
{
If (asciicode> = 0 & asciicode <= 255)
{
System. Text. asciiencoding = new system. Text. asciiencoding ();
Byte [] bytearray = new byte [] {(byte) asciicode };
String strcharacter = asciiencoding. getstring (bytearray );
Return (strcharacter );
}
Else
{
Throw new exception ("ASCII code is not valid .");
}
}