eezzekl Asked: 2020-02-29 06:36:28 +0800 CST 2020-02-29 06:36:28 +0800 CST 2020-02-29 06:36:28 +0800 CST How to write a Lambdba function in VB.NET 772 Note: This is a translation of an English SO question. I am working on a VB.net project. I am new to VB.net LINQ and would like to know the Lambda equivalent of var _new = orders.Select(x => x.items > 0); In VB.net original question here vb.net 1 Answers Voted Best Answer eezzekl 2020-02-29T06:36:28+08:002020-02-29T06:36:28+08:00 Note: This is a translation of the accepted SO answer in English The lamdba syntax is not very different from a regular delegate. If creating a lamdba that returns some value is used Function. Otherwise, if it does not return a value, useSub Dim _new = orders.Select(Function(x) x.Items > 0) Dim action As Action(Of Item) = Sub(x) Console.WriteLine(x.Items) here the original answer
Note: This is a translation of the accepted SO answer in English
The lamdba syntax is not very different from a regular delegate.
If creating a lamdba that returns some value is used
Function
. Otherwise, if it does not return a value, useSub
here the original answer