C # Chinese source file management string

Source: Internet
Author: User

We all know that there is a resource file in MFC, and there is also a resource file in C #, with which you can manage various resources. If some strings are used in our program, but these strings may be revised in the future, you can use the resource source file for management and it will be easier to modify them later.

I think it is easier to understand this type of things simply by using images and code.

Add a new project, select resource file, and name the file. Here we name it stringresourcemanage. resx.

After adding, You can edit the characters in vs IDE. As shown in:

Okay. How can I call it in the program code after adding characters to the resource file?

So easy, check the Code:

Label1.text = stringresourcemanage. buttontext;

Complete

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.