how to remove coma "," from first word in c# unity
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Test : MonoBehaviour { public InputField inputField; public Button Add1; public Button Add2; GameObject Panel; GameObject PanelText1; GameObject PanelText2; GameObject InputField; //bool Addtext = true; //bool Addtext2 = true; public List<string> words = new List<string>(); public List<string> word = new List<string>(); // Start is called before the first frame update void Start() { Add1 = GameObject.Find("/Canvas/Panel/Add1").GetComponent<Button>(); Add1.onClick.AddListener(InputText1); Add2 = GameObject.Find("/Canvas/Panel/Add2").GetComponent<Button>(); Add2.onClick.AddListener(InputText2); PanelText1 = GameObject.Find("/Canvas/Panel/Text1"); PanelText2 = GameObject.Find("/Canvas/Panel/Text2"); InputField = GameObject.Find("/Canvas/InputField"); } public void InputText1() { words.Add(InputField.GetComponent<InputField>().text); InputField.GetComponent<InputField>().text = " "; PanelText1.GetComponent<Text>().text = " "; for (int i = 0; i < words.Count; i++) { PanelText1.GetComponent<Text>().text += ("," + words[i]); } } public void InputText2() { word.Add(InputField.GetComponent<InputField>().text); InputField.GetComponent<InputField>().text = " "; PanelText2.GetComponent<Text>().text = " "; for (int i = 0; i < word.Count; i++) { PanelText2.GetComponent<Text>().text += "," +( word[i]); }