简体   繁体   中英

Can't insert unicode symbol in C# resource file

I have a WPF app and need to display the "white star" (u+2606) character in a label. Of course if I set the string in code with "\☆" it works fine. However, I can't figure out how to put this into the resource file. When I type ALT+2606 it inputs a period instead of the start. What am I doing wrong?

From this SO answer - try inserting from the Character Map.

To launch the Character map from the command prompt, type charmap .

Select Segoe-UI-Symbol and type 2606 in the Unicode box. Click on the star, then Click the Select button and then the Copy button will put it into your clipboard.

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM