public static String removeLastColon(String list) { list = list.Trim(); if (list.Substring(list.Length - 1) == ",") { return list.Substring(0, list.Length - 1); } else { return list; } } /*