Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Updated 1-Jun-11 1:23am
v2

 
Share this answer
 
Comments
ShilpiP 1-Jun-11 5:23am    
Hi Sandeep,
The Third link shows
string orig = "喂 Hello 谢谢 Thank You";

It means that I can use Unicode string without changing the value to hexadecimal.
string orig = "क्क"; is okie.
Am I correct ??
Sandeep Mewara 1-Jun-11 5:50am    
Yep. Looks like so - thats the reason I shared the third link. It's just that the way they are being accessed and used. See and try which one fits in for you.
ShilpiP 1-Jun-11 7:22am    
Yes It works. Thanks.
Sandeep Mewara 1-Jun-11 8:28am    
Good to know! :thumbsup:
ShilpiP 1-Jun-11 9:34am    
:)
string[] arr = new string[] { 1, 2, 3, 4, 5 };

      for (Int32 x = 0, l = arr.Length; x <= l; x++) {
         Console.WriteLine(arr[x]);
      }
 
Share this answer
 
v2
Comments
ShilpiP 1-Jun-11 1:30am    
It means that if I store the array like
string[] arr = new string[] { "\x0915\x094D\x0915", "\x0915\x094D\x0915" }; is okie
or arr = new string[] { "क्क", "क्क" };
RaviRanjanKr 1-Jun-11 1:53am    
Always wrap your Code in "pre" tag :)
Hi,

Strings in .NET were interpreted as unicode by default.

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

Good luck!
 
Share this answer
 
Comments
ShilpiP 1-Jun-11 1:30am    
It means that if I store the array like
string[] arr = new string[] { "\x0915\x094D\x0915", "\x0915\x094D\x0915" }; is okie
or arr = new string[] { "क्क", "क्क" };
Pong D. Panda 1-Jun-11 1:46am    
yes, you can search google for more details about unicode implementation on .Net, if you're still undecided about the language to use, I recommend using c#.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900