Union合并数组(去掉重复的项目)

   string[] a = {"a", "b"};

            string[] b = { "b", "c", "d" };

            var data = (from t1 in a select t1).Union(from t2 in b select t2);
            foreach (var str in data)
            {
                MessageBox.Show(str);
            }
posted @ 2011-08-26 13:52  litsword  阅读(936)  评论(0编辑  收藏  举报