its a simple code to split a byte array and see how it works. But the problem is I get weird outputs.
public static void SplitArayUsingLinq()
{
int i = 3;
string data = "123456789";
byte[] largeBytes = Encoding .Unicode .GetBytes (data);
byte[] first = largeBytes.Take(i).ToArray();
byte[] second = largeBytes.Skip(i).ToArray();
string firststring = Encoding.Unicode .GetString (first);
string secondstring = Encoding.Unicode.GetString(second);
Console.WriteLine(" first : " +firststring);
Console.WriteLine(" second : " +secondstring);
}
when the value of i=3 I get this:

and when the value of i=4 I get this:

In both cases I get weird outputs. It seems that whatever the value of i is given, the program seems to consider its half. Can anyone tell me why is it happening? exactly where is the problem?