Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,

I was wondering if there is a way to convert a
C#
List<T>
to a
C#
VisualBasicValue<List<T>>
programmatically with reflection or something ?

At least with T is string or ValueType.

Thank you
Posted
Comments
Maciej Los 29-Oct-15 12:23pm    
Christophe, it's not well-formed question...
Note, that List<t> is generic class, which supports filtering, sorting, etc.
Sergey Alexandrovich Kryukov 29-Oct-15 12:26pm    
Why? What's wrong with List<t>?
I would strongly advise to avoid using anything VB-specific, use pure .NET FCL :-)
—SA
Maciej Los 29-Oct-15 12:36pm    
Thank you, Sergey for your comment to my answer (deleted).
[EDIT]
I didn't realize that VisualBasicValue class exists!
Christophe_ 1-Dec-15 10:11am    
Hi Maciej Los,

I want to add a List<string> (for example) as an argument to an activity (not the root activity) of my workflow. With WF4, if we use a non literal argument (ie something other than string or value types) we can't set its value, we need to use a VisualBasicValue or CSharpValue, I was wondering if we can convert a List to a VisualBasicValue programmatically because our workflows are designed by end user and I need that value to be stored in the workflow definition (not in a DynamicProperty from a DynamicActivity when running the workflow).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900