Question: How do I repeat generating a random char? I want to make a glitched text effect so I set:

```
textbox.text = st[Random.Range(0, st.Length)];

```

in my update method. I do however only get one character out of this line - how would I repeat this process in a string with the length of 5? What I am trying to achieve is to randomly generate 5 characters over and over again. There must be a better way than this:

```
randomChar + randomChar + randomChar + randomChar + randomChar

```

Thank you in advance!

Answer: 
Could use something similar:

```
 public static readonly char[] CHARS = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' };
    static void Main(string[] args)
    {

        static string GenerateGlitchedString(uint wordCount,uint wordslength)
        {
            string glitchedString = "";

            for (int i = 0; i < wordCount; i++) 
            {
                for (int j = 0; j < wordslength; j++) 
                {
                    Random rnd = new Random();
                    glitchedString += CHARS[rnd.Next(CHARS.Length)];
                }
                glitchedString += " "; //Add spaces
            }
            return glitchedString;
        }

        string output = GenerateGlitchedString(5, 5);
        Console.WriteLine(output);
    }

```
You can use Linq to generate any number of random characters from an enumerable:

```
int howManyChars = 5;
var newString = String.Join("", Enumerable.Range(0, howManyChars).Select(k => st[Random.Range(0, st.Length)]));
textbox.text = newString;

```