/// <summary>
/// List泛型去重
/// </summary>
/// <param name="list">由一維數組組成的泛型</param>
/// <param name="ItemID">要去除重復的項</param>
private void RemoveRepeaterUrl(ref List<string[]> list,int ItemID)
{
for (int i = 0; i < list.Count; i++)
{
for (int j = (i + 1); j < list.Count; j++)
{
if (list[j][ItemID] == list[i][ItemID])
{
list.RemoveAt(j);//去除相同的項
i = 0;//從新開始去重,如果數組內有大量重復的項,僅一次去重不能解決問題。這樣的用法會使效率慢1/3
j = 0;
}
}
}
}