Removing characters from end of string from character to character I have a program that returns the following:

PS4      Modern Warfare (2019)
Xbox One Modern Warfare (2019)
PS4      Grand Theft Auto V (5)
Xbox One Grand Theft Auto V (5)


I want to remove the parentheses from the end of he strings so they would look like the following:

PS4      Modern Warfare
Xbox One Modern Warfare
PS4      Grand Theft Auto V
Xbox One Grand Theft Auto V


Currently, the code I have does it however I don't believe it is the best way to go about it as it seems to0 big for what it does.

foreach(var i in methodResponse.Response.Data.Results.Where(x =&gt; x.CategoryFriendlyName == platform))
{
    if (i.BoxName.EndsWith(")"))
    {
        var arr = i.BoxName.ToArray();
        bool exit = false;

        while(exit != true)
        {
            for (int j = arr.Length - 1; j != 0; j--)
            {
                if (!exit)
                {
                    if (arr[j] != '(')
                    {
                        i.BoxName = i.BoxName.Remove(j, 1);
                    }
                    else if (arr[j] == '(')
                    {
                        i.BoxName = i.BoxName.Remove(j, 1);
                        exit = true;
                    }
                }
            }
        }

        i.BoxName = i.BoxName.TrimEnd();
    }


I want to be able to understand an easier way to solve this issue. I know I could use substring however as you can see, the length of the item i want to remove is not always the same.

NOTE: If there are two sets of brackets in the name, I simply want to remove the last set, no other.
You could simply take advantage of the string.LastIndexOf() method together with the string.Substring() method like so  

private static string Clean(string value)
{
    return value.EndsWith(")") ? value.Substring(0, value.LastIndexOf('(')).TrimEnd() : value;
}


and use it like so  

foreach(var i in methodResponse.Response.Data.Results.Where(x =&gt; x.CategoryFriendlyName == platform))
{
    i.BoxName = Clean(i.BoxName);
}  




Some side notes about the posted code:  


Don't use abbreviations when naming stuff e.g var arr  
You shouldn't check like while(exit != true) but rather like so while(!exit)