How to use Unicode available in vb6 in vb.net?
Is there any equivalent of vb6 Unicode in vb.net??
问题:
回答1:
Are you using vbUnicode in order to convert a Byte Array to a String? Like the following?
StrConv(ByteArray, vbUnicode)
If so this is the .Net equivalent of that function
Dim theString as String = System.Text.Encoding.Unicode.GetString(ByteArray)
回答2:
All strings in .NET (and hence in VB.NET) are unicode. .NET also has libraries to output strings in different formats (see the System.Text.Encoding class and related classes). What exactly are you trying to do with unicode?
回答3:
VB 6 did not support Unicode, at least not directly. There were ways around it, but it was a royal pain in the rear. If you are asking does VB 6 support unicode like VB.NET, the answer is no.
If, instead, you are asking whether or not you can use something like code pages in VB.NET, the answer is an indirect yes, although I see no reason to jump through that hoop to support globalization/localization, as the paradigm has shifted.