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.