Check out example codes for "c# list to string replace last comma with and". It will help you in understanding the concepts better.

Code Example 1

var test = "Service Control Manager repeated 5 times, Microsoft-Windows-DistributedCOM repeated 2 times, Control Manager repeated 6 times.";
        var lastComma = test.LastIndexOf(',');
        if (lastComma != -1) test = test.Remove(lastComma, 1).Insert(lastComma, " and");

Learn ReactJs, React Native from akashmittal.com