s*****w 发帖数: 1527 | 1 【 以下文字转载自 Programming 讨论区 】
发信人: somehow (淡泊明志,宁静致远), 信区: Programming
标 题: Array Find() method doesn't exist in Visual c# 2010 express ?
发信站: BBS 未名空间站 (Sun Jan 9 09:38:14 2011, 美东)
assume i have a array {0, 5, 2, -1, 3, 6}
want to find the index for 2,
how to do it pls ? | f******n 发帖数: 198 | 2 - Array.IndexOf() for finding one element.
- Array.Find() and its variations for general purpose search.
- Array.BinarySearch() if the array is pre-sorted.
All of these are static, so they're not very discoverable... |
|