मुझे MAX लैम्ब्डा अभिव्यक्ति के vb equivilant का उपयोग कर कोई समस्या है। foos.Max (समारोह (एक्स) x.id) पर मैं जब संपत्ति आईडी वी.एस. यह नहीं दिखाएगा IntelliSense का प्रयास करें। लेकिन जब मैं उदाहरण चलाता हूं तो यह काम करता है। क्या मैं ऐसा कुछ कर रहा हूं जो गलत है, मैं बस भाग्यशाली हूं कि यह चलता है?vb lambda MAX function
Sub Main()
Dim foos As New List(Of Foo)
Dim bob As New Foo() With {.id = 5, .name = "bob"}
foos.Add(bob)
foos.Max(Function(x) x.id)
End Sub
Public Class Foo
Public Property id() As Integer
Get
Return m_id
End Get
Set(ByVal value As Integer)
m_id = Value
End Set
End Property
Private m_id As Integer
Public Property name() As String
Get
Return m_name
End Get
Set(ByVal value As String)
m_name = Value
End Set
End Property
Private m_name As String
End Class