Trouble with my string list

I have been having trouble getting my program to print out individual elements of a list. I have been given a number of tips and suggestions that have helped me a lot, however I am still not getting the desired output. First I need to show the code that I am working on.

What I am currently using is an extension class that handles printing the list onto the screen.

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public static class Extensions {
    /// <summary>
    /// Converts a list to a string
    /// </summary>
    public static string ConvertToString<T>(this List<T> list)
        var output = string.Empty;
        foreach (var item in list)
            output += item.ToString() + ",";
        return output;

This is the list that I want to use:

public static List<string> task1Gesture = new List<string>(new[]

This is how I am using the list and the extension class

string[] gestureOptions = {   Cube_DemoPhase.task1Gesture.ConvertToString<string>(),

This diagram will show what I am getting on the screen:

Can anyone help me figure out what I need to do in order to get this right?

Your extension method outputs all list elements as a single string, while you need to get separate elements from it. When you create gestureOptions array, you just pass to it three the same elements.

The easiest solution is to just fill the gestureOptions variable with proper values:

string[] gestureOptions = { "Tap", "Grab", "Grip" };

But in case when you have to store these values in Cube_DemoPhase class as a generic list, then you can do:

string[] gestureOptions = Cube_DemoPhase.task1Gesture.ToArray();

There’s no need for your extension class at all…

EDIT, that I hope will finish the line of “array of strings problem”

After reading all the comments + all your other questions related to the same problem, my solution is below. Please note that it required LINQ, so add using System.Linq; on top of your class:

string[] gestureOptions = { "a", "b", "c", "d", "e" };
int[] indexes = Enumerable.Range(0, gestureOptions.Length).ToArray();
for (int i = indexes.Length - 1; i > 0; i--)
    var r = Random.Range(0, i);
    var tmp = indexes*;*

indexes = indexes[r];
indexes[r] = tmp;
var index = 0;
gestureOptions = gestureOptions.OrderBy(x => indexes[index++]).ToArray();
Now, in indexes array, you have the positions of your randomized strings…
And here’s my advice: next time please describe your problem fully in one question, and don’t be afraid that it is long. You decided to share your problem and code piece by piece, and that caused a lot of confusion and lost time. Believe me - if the first question related to this problem were detailed, you’d have your answer the day you posted it.
Please go through all the previous question and close them all. And don’t forget to reward people who tried to help by upvoting their answers/comments.