I am trying to understand the usage of lambda functions in VB.NET, using the following example. But something is not correct. Specifying 'Dim t as string = ...' doesn't work either. Can this be done?
Dim tagsList As New Dictionary(Of String, String)
Dim Name as string = "abc"
Dim t = Function(aName As String) If(tagsList.ContainsKey(aName), tagsList(aName), Nothing)
Dim Tag as string = t(Name)
Error BC30209 Option Strict On requires all variable declarations to have an 'As' clause. Error BC30574 Option Strict On disallows late binding.