How to represent Unicode character in VB.Net String literal?

CodeFusionMobile picture CodeFusionMobile · Jun 29, 2010 · Viewed 43.2k times · Source

I know you can put Unicode character codes in a VB.Net string like this:

str = Chr(&H0030) & "More text"

I would like to know how I can put the char code right into the string literal so I can use Unicode symbols from the designer view.

Is this even possible?

Answer

fivebob picture fivebob · Jun 29, 2010

Use the ChrW() function to return Unicode characters.

Dim strW As String
strW = ChrW(&H25B2) & "More text"