System.Array.IndexOf

Array.IndexOf Method

http://msdn.microsoft.com/en-us/library/system.array.indexof.aspx

.NET Framework 4.5
 Returns the index of the first occurrence of a value in a one-dimensional Array or in a portion of the Array.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Exception: return -1

原文地址:https://www.cnblogs.com/ilawrence/p/2740933.html