1. 程式人生 > >移除數組中重復數據

移除數組中重復數據

不重復 stat array [] summary str 復數 mar toarray

   #region 移除數組中重復數據
        /// <summary>
        /// 移除數組中重復數據
        /// </summary>
        /// <param name="array">需要除重的數組</param>
        /// <returns>不重復數組</returns>
        public static string[] DelRepeatData(string[] array)
        {
            return array.GroupBy(p => p).Select(p => p.Key).ToArray();
        }

#endregion

移除數組中重復數據