Convert Lambda from C# to VB.NET

Posted by Iosu on Stack Overflow See other posts from Stack Overflow or by Iosu
Published on 2010-04-20T18:35:25Z Indexed on 2010/04/20 19:33 UTC
Read the original article Hit count: 420

Filed under:
|
|

How would I translate this C# lambda expression into VB.NET ?

query.ExecuteAsync(op => op.Results.ForEach(Employees.Add));

using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using IdeaBlade.Core;
using IdeaBlade.EntityModel;

namespace SimpleSteps { public class MainPageViewModel { public MainPageViewModel() { Employees = new ObservableCollection(); var mgr = new NorthwindIBEntities(); var query = mgr.Employees; query.ExecuteAsync(op => op.Results.ForEach(Employees.Add)); }

public ObservableCollection<Employee> Employees { get; private set; } }

}

© Stack Overflow or respective owner

Related posts about c#

Related posts about vb.net