3

我有一个Workflow Foundation 4活动,该活动具有一个InvokeMethod,该活动被配置为调用IList(Of String)类型的实例上的Add方法,从而提供参数类型String如何使用InvokeMethod活动将字符串添加到使用Workflow Foundation的通用列表4

运行它虽然给了我这个错误:

'IList`1' does not have a public instance method named 'Add' matching the parameter 
types, generic type arguments, and generic type constraints supplied to InvokeMethod 
'InvokeMethod'. 

我已经试过了InvokeMethod活动我能想到的所有设置,都无济于事。

所以问题是:如何使InvokeMethod将字符串参数添加到通用列表中?

回答

4

为什么不使用AddToCollection活动?

+0

谢谢,很高兴看到有这样一个简单的解决方案。 – 2010-05-19 08:19:24