string input = "8,16,9,18,19";
input = string.Join(",", input.Split(new[] { ',' }).Select(i => i.Trim()).Where(i => i != "8"));
The above allows for spaces in the string also, like "8, 16, 9, ...". If you can guarantee there are no spaces you can omit the Trim
string input = "8,16,9,18,19";
input = string.Join(",", input.Split(new[] { ',' }).Where(i => i != "8"));