请帮我将下面的代码转换为vb.net。我不知道从匿名方法转换为vb.net。我目前正在使用VS2010。帮助将c#匿名转换为vb.net
public void DoWork(CustomObject obj)
{
var linq = (from s in storages
where s.Key == obj.Key
select s.Value).ToList();
Action<ICustomService> act =
delegate(ICustomService service)
{
service.ChangeValue(obj);
};
linq.ForEach(act);
}
在此先感谢您。
纯C#开发人员
VB.NET匿名类型只是'昏暗somename = ...' – BoltClock 2011-03-26 17:31:07
你为什么不使用普通的'foreach'声明? – CodesInChaos 2011-03-26 17:35:08
@BoltClock:他说匿名方法(委托),而不是匿名类型。 – 2011-03-26 17:59:26