C# Window Project - Set a variable in the List datatype to use the add and distinct method

Hello team,

I would like to create a variable to use the add and distinct method in my C# project.

Problem1
I can’t seem to use the datatype: system.collections.generics giving me an error: Not all generic types could be resolved.

image

Problem2
Once the datatype is set, I would like to add string items, using a for each activity, and then use the distinct method. I guess once the problem1 has been solved, it would be easier to solve this problem.

I wonder how I can achieve the process in my project, and I can get any help from this community. I look forward to hearing from you.

Thank you,
Tae

So @tae.park What trigger this error - You are trying to declare a list variable ?

for learning purpose we would suggest to us a String List
e.g.

and also play with the immediate panel:
grafik

Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

Thank you very much. It seems I need to set the default variable: new List() to make it work.

Perfect.
May we ask you to close the topic by:

Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.