score:10

Accepted answer

You can just convert an IEnumerable to an array of strings by calling the ToArray() extension method:

string.Join(",", Encoding.Unicode.GetBytes("10.10.10.11").Select(x => x.ToString("X2")).ToArray());

Sidenote:

Since .NET 4.0, there's an overload of String.Join that accepts an IEnumerable<String>, making the call to ToArray obsolete.

score:4

you can try with this ToArray()

string.Join(",", Encoding.Unicode.GetBytes("10.10.10.11")
   .Select(x => x.ToString("X2")))
   .ToArray();

Related Articles