I have access to one string variable named Storage. I would like to save an array of strings to the Storage variable along with other variables. Is this possible to save an array variable to a string? If it is how do i get the values out of the array? See code I have below.
// This Storage variable is just for code functionality. I do not create it.
string Storage; // See above^
string Apple = "Red";
string Bannana = "Yellow";
Queue<string> myQ = new Queue<string>();
myQ.Enqueue("zero");
myQ.Enqueue("one");
myQ.Enqueue("two");
myQ.Enqueue("three");
string[] myQ_Array = myQ.ToArray();
Storage = Apple + ";" + Bannana + ";" + myQ_Array[0] + ";" + myQ_Array;
var mySplitStorage = Storage.Split(';');
Console.WriteLine("mySplitStorage[0] = " + mySplitStorage[0]);
Console.WriteLine("mySplitStorage[1] = " + mySplitStorage[1]);
Console.WriteLine("mySplitStorage[2] = " + mySplitStorage[2]);//<--This works
Console.WriteLine("mySplitStorage[3] = " + mySplitStorage[3]);//<--Cant get this to work
Console.Read();
// This is the output
//mySplitStorage[0] = Red
//mySplitStorage[1] = Yellow
//mySplitStorage[2] = zero
//mySplitStorage[3] = System.String[] <--- How do i get the values out of the array?