日期:2014-05-17 浏览次数:20498 次
static void Main(string[] args)
{
ShowResult();
}
public static void ShowResult()
{
string str = "1,13,130";
string[] temp1 = str.Split(',');
List<string> list = new List<string>();
foreach (string s in temp1)
{
if (list.Count == 0)
list.AddRange(s.ToCharArray().Select(x=>x.ToString()));
else
list = JoinPart(list, s.ToCharArray().Select(x => x.ToString()).ToArray<string>());
}
foreach (string s in list)
Console.WriteLine(s);
}
public static List<string> JoinPart(List<string> part1, string[] part2)
{
List<string> result = new List<string>();
foreach (string str1 in part1)