Check the following code:
using System;
public class Program
{
public static void Main()
{
string[] myArray = new string[] {"one", "وزارة", "وكيل", "four"};
string temp = "";
for(int i=0; i<myArray.Length; i++)
{
if(temp == "")
temp = myArray[i].ToString();
else
temp += "|" + myArray[i].ToString();
}
Console.Write(temp);
}
}
Here's the link to .Net Fiddle.
https://dotnetfiddle.net/q7lHIu
This code is printing all elements in array one by one. The array contain two English and two Arabic words. Problem is as soon as you change the last element to start with number, it messes up everything.
For e.g. try to change "four" to "4four" and see what happens.
Why is this happening?