当前位置:网站首页>C# 合并集合
C# 合并集合
2022-07-25 19:21:00 【小目标一个亿】
代码:
List<string> listA = new List<string> { "A", "B", "C", "D", "E" };
List<string> listB = new List<string> { "F", "G", "C", "D", "E" };
//去除重复
List<string> ResultA = listA.Union(listB).ToList<string>();
//全部保留
List<string> ResultB = listA.Concat(listB).ToList<string>();
Console.WriteLine("ResultA:" + JsonConvert.SerializeObject(ResultA));
Console.WriteLine("ResultB:" + JsonConvert.SerializeObject(ResultB));输出:

边栏推荐
- 帝国CMS整站|手机号/QQ靓号商城源码|适配移动端
- Actual combat of MySQL database design project of online mall system
- MySQL sub query (selected 20 sub query exercises)
- 无惧高温暴雨,有孚网络如何保您无忧?
- 乐理基础 调式
- 微信小程序 29 热搜榜的完善②
- [help center] provide your customers with the core options of self-service
- 微信小程序 26 播放音乐页的完善②
- Modelsim and quartus jointly simulate PLL FIFO and other IP cores
- 这种动态规划你见过吗——状态机动态规划之股票问题(上)
猜你喜欢

C 调的满级和玄

Small program completion work wechat campus maintenance application small program graduation design finished product (2) small program function

某公司网络设计与规划

基于Mysql-Exporter监控Mysql

帝国CMS整站|手机号/QQ靓号商城源码|适配移动端
![[reading notes] deep learning Chapter 1: Introduction](/img/b3/58f71b032cd8f04ecf95d48281a41a.png)
[reading notes] deep learning Chapter 1: Introduction
![[server data recovery] a data recovery case of a brand ProLiant server raid paralysis, database file loss, and database file backup damage](/img/89/92ace2f76beefd258d00d26cd921c9.png)
[server data recovery] a data recovery case of a brand ProLiant server raid paralysis, database file loss, and database file backup damage

小程序毕设作品之微信校园维修报修小程序毕业设计成品(4)开题报告

Swift 基础 Codable(JSONEncoder JSONDecoder)的使用

Use of swift basic codable (jsonencoder jsondecoder)
随机推荐
微信小程序 26 播放音乐页的完善②
[cloud native kubernetes] management of secret storage objects under kubernetes cluster
JS learning notes 16: switching pictures small project practice
二叉树可视化
MySQL sub query (selected 20 sub query exercises)
The finished product of wechat campus maintenance and repair applet graduation design (1) development outline
Openresty Lua resty mlcache multi-level cache
Basic mode of music theory
QT compiled successfully, but the program could not run
Wechat campus maintenance and repair application applet graduation design finished product of applet completion work (6) opening defense ppt
PyQt5单击QTableView垂直表头verticalHeader获取行数据以及单击单元格获取行数据操作
[help center] provide your customers with the core options of self-service
The degree of interval of basic music theory
Youfu network was invited to attend the 2022 national CIO conference and won the title of "CIO trusted brand"
Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 1)
Huawei recruited "talented teenagers" twice this year; 5.4 million twitter account information was leaked, with a selling price of $30000; Google fired engineers who believed in AI consciousness | gee
小程序毕设作品之微信校园维修报修小程序毕业设计成品(5)任务书
Clip can also do segmentation tasks? The University of Gottingen proposed a model clipseg that uses text and image prompt and can do three segmentation tasks at the same time, squeezing out the clip a
高并发下如何保证数据库和缓存双写一致性?
Real estate industry reshuffle