Addrange的用法

效果如下:

附代码:

cs 复制代码
 public static void List()
 {
     List<int> list = new List<int> { 1,3,5};
     List<int> list2 = new List<int> { 2, 4,6 };
     "\n原始list为:\n".Print();
     list.ForEach(x=>x.Print());//var listrange =
      list.AddRange(list);
     "\naddrange后list为:\n".Print();
     list.ForEach(x => x.Print());

 }
相关推荐
callJJ7 分钟前
Volta + Claude Code 在 Windows 上的路径 Bug 复盘
windows·bug
女神下凡24 分钟前
这是 Cursor(Composer) 的五种核心交互模式
服务器·人工智能·windows·vscode·microsoft
techdashen30 分钟前
从 Windows 的 ping.exe 入手:动态库、调用约定与 Rust FFI
开发语言·windows·rust
独隅1 小时前
IntelliJ IDEA 在 Windows 上的完整安装与使用指南
java·windows·intellij-idea
逻极1 小时前
Windows 平台 Ollama AMD GPU 一键编译指南:基于 ROCm 7.1 的自动化实战
人工智能·windows·stm32·自动化·gpu·amd·ollama
caimouse2 小时前
Reactos 第 9 章 设备驱动 — 9.13 同步I/O与异步I/O
windows
caimouse2 小时前
Reactos 第 9 章 设备驱动 — 9.10 磁盘的Miniport驱动模块
windows·嵌入式硬件
caimouse3 小时前
Reactos 第 9 章 设备驱动 — 9.11 命名管道与Mailslot
windows
x***r1513 小时前
Krita 5.2.13 安装教程 Windows版:自定义路径+开源绘画软件配置指南
windows
就改了3 小时前
Windows Elasticsearch 完整上手教程
大数据·windows·elasticsearch