C# remove duplicate data from array

黄舟
Release: 2017-02-16 11:05:54
Original
2003 people have browsed it

   #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
Copy after login

The above is the content of C# to remove duplicate data in the array. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template