VB.NET 9.0: Lambda Expression Function

VB.NET 9.0: Lambda Expression Function

  • Comments 0

If you want to use Lambda Expression as reusable function, you need to use Func. By using the Func we are actually calling in-build delegate.


So if you write


Dim sqr As Func(Of Double, Double) = Function(x) x * x


Then you can use it in you application to get the square of a number.





This could be used in multiple places with different parameter as you generally do with any function.



Leave a Comment
  • Please add 1 and 8 and type the answer here:
  • Post