Krazii KiiD Krazii KiiD - 1 year ago 132 Question

Syntax error when converting Byte to Char in VB.NET

An error pops up when I write this:


The error is:

Overload resolution failed because no accessible 'Convert' accepts this number of arguments.

Answer Source

the Convert.ToChar will work for converting a byte to a char. for example the following cod will work without any problem:

    Dim byteArray(10) As Byte
    byteArray(0) = 65 'code of 'A' char
    Dim ch As Char
    ch = Convert.ToChar(byteArray(0)) 'ch becomes 'A'c

Can you explai more about what type is byteData(i) in your code? maybe it is not a byte as you expected. please check it or give more info from where you have defined it?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download