StringHelper

public class StringHelper
{
/// <summary>
/// Convert List to string
/// </summary>
/// <param name="inputs">List you wanna convert to special string</param>
/// <param name="chars">要去掉的字符</param>
/// <returns>return string</returns>
public static string ConvertToString(List<string> inputs,char chars)
{
string allEntities = inputs.Aggregate(string.Empty, (current, entity) => current + entity + ',');
return allEntities.TrimEnd(chars);
}
}

你可能感兴趣的:(String)