小工具知识网

当前位置: 首页 > 行业知识 > .NET from-where-select用法

行业知识

.NET from-where-select用法

2026-10-31 00:58:31 来源:互联网转载

���接上示例代码进行说明:

()

1. from-where-select的用法:

int[] arr = {3, 4, 5, 6, 7, 8, 9};int[] res = (from a in arr                where a > 4 && a  Console.WriteLine($"item");

2. 运行结果:

()
5678

3. 以上from-where-select用法可以for用法解读:

for (int i = 0; i  4 && res[i]  

上一篇:一键Ping网站响应速度检测,轻松掌握网站状态,助力网站优化!

下一篇:White读音怎么记?