Class Libraries in simplified Chinese to traditional Chinese characters in Asp.net

Source: Internet
Author: User

Although this is simple, it is also a classic class library. Personally, I like this class library very much.

Record it in text. Leave a record.

In vs, there is a classic Microsoft. VisualBasic. dll VB class library, according to the official description:

It provides simple and intuitive access to many. NET Framework classes, enabling you to writeProgram, Settings, resources, and other interactive operations and MethodsCode.

This time, I want to write a more classic article. The operation method for converting simplified Chinese characters to traditional Chinese characters should first reference the class library.

You can reference Microsoft. VisualBasic. dll in the project.

 

To achieve the simplified and traditional conversion method:

Microsoft. VisualBasic. Strings.Strconv (string STR, vbstrconv conversion, int localeid );

SimplifiedTraditionalConversion, onlyFor different values

Simplified to traditional Chinese:Microsoft. VisualBasic. Strings. strconv (string STR, vbstrconv. traditionalchinese, 0)
Traditional to simplified:Microsoft. VisualBasic. Strings. strconv (String StrVbstrconv. simplifiedchinese, 0)

STR: string expression to be converted.
Conversion: Microsoft. VisualBasic. vbstrconv. The enumerated value of the conversion type to be executed.
Localeid: localeid value (if it is different from the system localeid value ). (The default value is localeid .)

What is the actual use?So let's do a test.

   code highlighting produced by actipro codehighlighter (freeware) 
http://www.CodeHighlighter.com/
--> class Program
{< br> static void main ( string [] ARGs)
{< br> console. write (Microsoft. visualBasic.
strings. strconv ( " blog " ,
Microsoft. visualBasic. vbstrconv. traditionalchinese, 0 ));
console. read ();
}< BR >}

The output result is (directly upload the image, which is more intuitive)

 

Of course, this is relatively simple. If this method is often used, you can also write a conversion extension method using an extension method last week.


Related Article

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.