Converting a character code to char (VB.NET)

后端 未结 4 1169
孤城傲影
孤城傲影 2020-12-30 19:57

I\'m able to convert a character to its corresponding character/ASCII code using \"Asc(CHAR)\". What can I use to convert this returned integer back to its original characte

4条回答
  •  时光取名叫无心
    2020-12-30 20:25

    you can also use

    Dim intValue as integer = 65  ' letter A for instance
    Dim strValue As String = Char.ConvertFromUtf32(intValue)
    

    this doesn't requirement Microsoft.VisualBasic reference

提交回复
热议问题