zoukankan      html  css  js  c++  java
  • C# wpf 使用资源文件 resx

    随意新建一个wpf应用

    在cs代码编辑,增加

    using System.Resources;

    放在最上

    在方案新建文件夹 名 文件

    在 文件 新建资源文件 资源.resx

    资源.resx 添加字符串

    a 值 逗

    获得资源

    string str;
    ResourceManager loader = Properties.Resources.ResourceManager;
    loader = 文件.资源.ResourceManager;
    str = 文件.资源.a;
    //或
    str = loader.GetString("a");
    
    


  • 相关阅读:
    java设计模式概述
    Filter
    hello1 hello2 代码分析
    计划
    页面生命周期1
    Jquery
    关于DropDownList
    页面生命周期
    随机生成验证码
    关于技术
  • 原文地址:https://www.cnblogs.com/lindexi/p/12087812.html
Copyright © 2011-2022 走看看