作者jkv9c (jkv9c)
看板C_Sharp
标题[问题] List FindIndex 方法
时间Fri Aug 26 23:17:14 2016
各位好 想要请教一下这个问题
为了要在List中取得他的索引值 故使用FindIndex这个方法
我的程式码是这样
public int getInvoiceIndex(string InvoiceNumber)
{
return ALLInvoiceNo.FindIndex(x => x == InvoiceNumber);
}
想要问一下 x => x 中间的那个符号=>是什麽意思,是运算子吗?
然後里面包的引数又是啥 FindIndex(里面的东西)?
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 114.27.192.45
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/C_Sharp/M.1472224636.A.B11.html
1F:推 james732: 关键字:lambda 08/26 23:37
2F:→ testPtt: function(x){return x == InvoiceNumber;} 08/26 23:41