Nota
O acesso a esta página requer autorização. Pode tentar iniciar sessão ou alterar os diretórios.
O acesso a esta página requer autorização. Pode tentar alterar os diretórios.
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.
Console.WriteLine(sqr(2))
Console.WriteLine(sqr(8))
This could be used in multiple places with different parameter as you generally do with any function.
Namoskar!!!