Vb.Net action delegate problem?
- by Ramesh Vel
Hi,
Am vb.net newbie. This question might be very novice and answered before, but i couldn't find. I was trying the lambda features and got struck here.
Private Function HigerOrderTest(highFunction as Func(Of Int16,Int16)) As Action(of String)
Dim sam = highFunction(3)
Dim DoIt as Action(of String)
DoIt = sub(s) console.WriteLine(s)
return DoIt
End Function
I got "Expression expected." at line DoIt = sub(s) console.WriteLine(s). And when i changed this to DoIt = function(s) console.WriteLine(s) i got Expression does not produce a value. error. Whats the problem?
Cheers