📅  最后修改于: 2022-03-11 14:49:19.539000             🧑  作者: Mango
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");