how do I add a specified number to a string?

so in my game I basically have a shop that I want to use in order to fake/spoof microtranactions.
In order to this, I have a button that I would like to use to increment the players currency by a specified value, in this case 50 but at the moment my script is just resetting the value to nothing.

Any ideas on how to do this?


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

public class IAP : MonoBehaviour
{
    public Text currencyText;

    public int currencyToAdd;

    private void Start()
    {
        currencyText.text = "Currency: " + GameManager.Instance.currency.ToString();
        currencyToAdd = 0;
    }

    public void _50Currency()
    {
        currencyToAdd = 50;
        currencyText.text = "Currency: " + GameManager.Instance.currency.ToString() + currencyToAdd;
    }
}

You are not increasing currency, you are concatenating currencyToAdd to the string.
Try this instead:

    public void _50Currency()
     {
         currencyToAdd = 50;
         GameManager.Instance.currency += currencyToAdd;
         currencyText.text = "Currency: " + GameManager.Instance.currency.ToString();
     }
 }