Hi,
In the code
string[] b = a.ToString();
you are assigning a string object to array. You will have to assign a string array type object to it.
A string is an object of type String whose value is text. Internally, the text is stored as a sequential read-only collection of Char objects.
While a string array is a collection of strings. Hence, you cannot assign that way.
Try converting a object to string array and then assigning it to the array.
For e.g in your code try:
string[] b = ((System.Collections.IEnumerable)a).Cast<object>().Select(x => x.ToString()).ToArray();
Hope this helps !! :)
Regards,
Praneet