過濾陣列重覆的使用方式
char[] chr = new char[] { ',' };
string[] strlist = str.Split(chr, StringSplitOptions.RemoveEmptyEntries);
IEnumerable
foreach (string str in noduplicates)
{
................................
}
過濾陣列重覆的使用方式
char[] chr = new char[] { ',' };
string[] strlist = str.Split(chr, StringSplitOptions.RemoveEmptyEntries);
IEnumerable<string> noduplicates = strlist.Distinct();
foreach (string str in noduplicates)
{
................................
}