Using an array as argument for string.Format()

You can convert int array to string array as pass it using System.Linq Select() extension method.

infoText.text = string.Format("Player1: {0} \nPlayer2: {1} \nPlayer3: {2} \nPlayer4: {3}", 
                              place.Select(x => x.ToString()).ToArray());

Edit:

In C# 6 and above, you can also able to use String Interpolation instead of using string.Format()

infoText.text = $"Player1: {place[0]}\nPlayer2: {place[1]} \nPlayer3: {place[2]} \nPlayer4: {place[3]}";

Check this fiddle for your reference.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)