.Net中的Unicode数据的字符串数组[已解决] [英] String array for Unicode data in .Net[Solved]

查看:72
本文介绍了.Net中的Unicode数据的字符串数组[已解决]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将一个VC ++应用程序移植到.Net.这是我的课程之一,应该移植到.Net中.我对.Net没有任何想法.
因此,给我造成麻烦的第一件事是如何在.Net
中创建Unicode字符串数组
在VC ++中,我存储Unicode数组,如下所示:

I am porting one VC++ application to .Net. It is one of my class that should be ported in .Net. I do not have any idea of .Net.
So first thing that creates a problem for me is that how to create an array of Unicode string in .Net

In VC++, I store the Unicode array as shown below:

m_pwstLanConjuncts[0] =		L"\x0915\x094D\x0915"; //kka



请给我一个想法或链接,以消除我的疑问.

预先感谢.



Just give me idea or link that clear my doubt.

Thanks in advance.

推荐答案

看看这些:
将Unicode字符串转换为byte [] [ ^ ]
如何获取数组Unicode代码指向一个.NET字符串? [另一种技术:.NET字符串到字节数组C# [
Have a look at these:
Convert Unicode string to byte[] [^]
How would you get an array of Unicode code points a .NET String?[^]
Another technique: .NET String to byte Array C#[^]


string[] arr = new string[] { 1, 2, 3, 4, 5 };

      for (Int32 x = 0, l = arr.Length; x <= l; x++) {
         Console.WriteLine(arr[x]);
      }




默认情况下,.NET中的字符串被解释为unicode.

这是
链接 [
Hi,

Strings in .NET were interpreted as unicode by default.

Here''s the link[^] for the array implementation in .net.

Good luck!


这篇关于.Net中的Unicode数据的字符串数组[已解决]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆