views:

28

answers:

2

I have a List array called taskItems

public class TaskItem
{
    public int Intnum { get; set; }
    public int ID { get; set; }
    public int TaskID { get; set; }
    public string Name { get; set; }
    public string Value { get; set; }
}


taskItems.Find(x => (x.Name == "function")).Value

I am trying to use the Assign component in windows workflow to assign the above lambda expression to a string variable. This string variable is in FlowChart. It won't take it. The same lamdba expression works if I use it in code.

+1  A: 

You're using C# syntax. Workflow expressions are VB only. The equivalent syntax in VB should be:

taskItems.Find(Function(t As TaskItem) t.Name = "function").Value
Drew Marsh
Awesome! that worked great. I had to make a little change though.taskItems.Find(Function(t As TaskItem) t.Name = "function").ValueI didn't know that it's vb only. Thanks for that too.
gangt
Oops, yeah... see I'm a C# guy too. :) Updated my sample code.
Drew Marsh
Suggest marking this as the answer and closing the question now.
Drew Marsh
A: 

Awesome! that worked great. I had to make a little change though.

taskItems.Find(Function(t As TaskItem) t.Name = "function").Value

I didn't know that it's vb only. Thanks for that too.

gangt