Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
给定一个数组 {1,4,5,6,7,4,7,8}
如何检查是否有 4 和 7 之间的值?
given.Any(n => n > 4 && n < 7);
随意更改>并<符合您对排他性的要求。
>
<
array.Any(i=>i>=4 && i<=7);