请问怎样在一个List找到所有字符为 hot的index?
好像可以用findall(Address of Method1),如果我的字符hot是个变量,该怎么弄?谢谢
[解决办法]
string findex="hot";
var list=list.where(t=>t.index.contains(findex)).ToList();
[解决办法]
Dim s As String = "hot"
Dim query = list.Select(Function(x, i) New With { .x = x, .i = i }).Where(Function(x) x.x = s).Select(Function(x) x.i)
For Each i As Integer In query
MsgBox i
Next