How do I create a Resources file for a Console Application?

后端 未结 5 777
耶瑟儿~
耶瑟儿~ 2021-01-11 13:36

I\'m trying to use an embedded resource in a console application, but apparently console applications don\'t come with a resource file automatically. How do I create a reso

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-11 13:59

    I added the answer in my answer to your previous question:

    Right-Click on 'test' in Solution Explorer -> Add -> New Item -> Resources File

    Then double-click on the created file (e.g. Resource1.resx), and take it from there.

    Then use it:

    string s = Resource1.String1;
    

提交回复
热议问题