C# wpf 使用資原始檔 resx
在cs程式碼編輯,增加
using System.Resources;
放在最上
在方案新建資料夾 名 檔案
在 檔案 新建資原始檔 資源.resx
資源.resx 新增字串
a 值 逗
獲得資源
string str;
ResourceManager loader = Properties.Resources.ResourceManager;
loader = 檔案.資源.ResourceManager;
str = 檔案.資源.a;
//或
str = loader.GetString("a");