看板 C_Sharp 關於我們 聯絡資訊
各位好 想要請教一下這個問題 為了要在List中取得他的索引值 故使用FindIndex這個方法 我的程式碼是這樣 public int getInvoiceIndex(string InvoiceNumber) { return ALLInvoiceNo.FindIndex(x => x == InvoiceNumber); } 想要問一下 x => x 中間的那個符號=>是什麼意思,是運算子嗎? 然後裡面包的引數又是啥 FindIndex(裡面的東西)? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.27.192.45 ※ 文章網址: https://www.ptt.cc/bbs/C_Sharp/M.1472224636.A.B11.html
james732: 關鍵字:lambda 08/26 23:37
testPtt: function(x){return x == InvoiceNumber;} 08/26 23:41