标签:ems style console new indexof log index span logs
List<string> items = new List<string> { "111", "222", "333" }; foreach (string item in items) { int index = items.IndexOf(item); Console.WriteLine(index); }
以下代码的执行结果是:
0 1 2
标签:ems style console new indexof log index span logs
原文地址:http://www.cnblogs.com/wzwyc/p/6843844.html