ラムダの有無にかかわらず、以下を達成する最良の方法は何ですか?
Module Module1
Sub Main()
Dim countries As New List(Of Country)
countries.Add(New Country("Africa"))
countries.Add(New Country("India"))
countries.Add(New Country("China"))
countries.Add(New Country("Belgium"))
Dim newCountry As String = "Spain"
If Not countries.Exists(newCountry) Then
countries.Add(New Country(newCountry))
End If
End Sub
End Module
Public Class Country
Public Name As String
Public Sub New(name As String)
Me.Name = name
End Sub
End Class