preface

Hello everyone, I am Bai Mo, a love of learning and swimming contradictions.

Recently I have just come into contact with RPA, and I am learning UIPath. Yesterday, I needed to use the List set. Creating the List set directly and using it will report an error, so I need to instantiate the List. I studied Java, but UIPath is VB.NET syntax… I thought I could work it out by analogy, but I studied it for a while. For the record, this is also the first time I’ve written about RPA. (It turned out to be something really simple…)


The body of the


1. Create a List variable

List to create simple, variable type selection System. Collections. Generic. A List < String >.

2. Instantiate the List variable

UIPath is drag-and-drop programming, but internally it’s still VB syntax. To initialize a List, we need to start with VB syntax.

When we create a project in UIPath, we need to select both VB and C# languages. VB is VB.NET. The default is VB.NET.

Let’s start with initializing a List set of generic String in VB.NET:

Dim listName as New List(of String) From {" hello "," sure "," bad "," whatever "}

After one listName is variable names, as the New List (of String) is to instantiate a generic set of String List, the From {” “, “”} is initialized data.

The same is true for Int, and so on for other types:

Dim intList as New List(of int32) From {5,2,0}

Now let’s instantiate it inside UIPath.

New List(of String) is the Default name. I don’t need to assign an initial value, so I’m not writing From, so I can just write From if I need to.

3. Use of collections

There is a corresponding component in UIPath for operations on arrays and collections: Collection, which is easy to add, delete, change and look up.

  1. Add To Collection. Remember to select the TypeArgument, all of them.

  2. Query for Exists In Collection

  3. Remove an item From the Collection.

  4. Clear the Collection.


Afterword.

Well, that’s all for this article! Would you care to pay attention? Would you care to pay attention? Point a attention bar ~ has the question please comment, the private letter exchanges together!

Public number [white ink is a program ape] reply [information] access to my collection of various tutorials, software, e-book resources ~ (collection = learned? 2333).