代码如下:
/// <summary>
/// 扩展类
/// </summary>
public static class Extend
{
/// <summary>
/// 扩展Join方法
/// 把数组分割
/// 截取最后一位
/// </summary>
/// <param name="s"></param>
/// <param name="separotor">间隔符号</param>
/// <param name="value">数组</param>
/// <returns></returns>
public static string E_Join(this string [] value,string separotor)
{
string str = string.Join(separotor, value);
if (str.Length >= 2)
{
return str.Substring(0, str.Length - 1);
}
else
{
return str;
}
}
}