我有这些东西
Public Class Class1
Public Property Type As String
Public Property SpecLimits As Limits
End Class
Public Class Limits
Public Property MinValue As Double?
Public Property MaxValue As Double?
End Class
我可以再吃一点
Type
-和他们的
Speclimits
价值观我需要找到最大值。我可以用一个
for each
每次都要检查哪个数字更大,但我想也许他们的数字更大
linq
这是可以实现的。
我在一个房间里发现了类似的东西
c#
var maxItem = emplist
.Select((emp, index) => new
{
maxProject = emp.project
.Select((proj, pIndex) => new{ proj, pIndex })
.OrderByDescending(x => x.proj.ID)
.First(),
emp, index
})
.OrderByDescending(x => x.maxProject.proj.ID)
.First();
但我不能把它翻译成
vb.net
感谢您的帮助!