我有这堂课:
Protected Class MyClass
Public item1 As Integer = 0
Public item2 As Boolean = False
End Class
然后我创建一个将填充TreeView(Telerik)节点的MyClass列表
Dim customlist As New List(Of MyClass)
For Each node As RadTreeNode In rtv.GetAllNodes
Dim item As New MyClass
item.item1 = node.Value
item.item2= node.Checked
customlist.Add(item)
Next
但是我不想用foreach填充列表¿我如何处理linq?例如:
Dim customlist As List(Of MyClass) = rtv.GetAllNodes.Select(Of MyClass)(¿what code goes here?).ToList()
感谢。