/// <summary>
/// 将字符串"123456"转换成"1,2,3,4,5,6"
/// </summary>
/// <param name="code">要转换的字符串</param>
/// <returns>转换结果</returns>
protected string ConvertString(string code)
{
string result = string.Empty;
for (int i = 0; i < code.Length; i++)
{
result += string.Format("{0},", code.Substring(i, 1));
}
return result.Remove(result.Length - 1);
}
/// 将字符串"123456"转换成"1,2,3,4,5,6"
/// </summary>
/// <param name="code">要转换的字符串</param>
/// <returns>转换结果</returns>
protected string ConvertString(string code)
{
string result = string.Empty;
for (int i = 0; i < code.Length; i++)
{
result += string.Format("{0},", code.Substring(i, 1));
}
return result.Remove(result.Length - 1);
}