preface
Hello everyone, I am Bai Mo, a love of learning and swimming contradiction.
I just got to know RPA recently, and I was learning UiPath. Yesterday’s requirement needed to use the List set, and it would report an error to directly create and use the List set, so we need to instantiate the set. I learned Java, UiPath is VB.NET syntax… I thought I could figure it out by analogy, but it took a while. For the record, this is also the first time I’ve written about RPA. (It turns out to be something really simple…)
The body of the
1. Create the List variable
List to create simple, variable type selection System. Collections. Generic. A List < String >.
2. Instantiate the List variable
Although UiPath is a drag and drop programming method, the internal is VB syntax. So, to initialize the List collection, we need to start with VB syntax.
When we create projects in UiPath, we need to choose between VB and C#, and VB is VB. Net. The default is VB.NET.
Let’s start with VB.NET initializing a List with a generic String:
dim listName as New List(of String) From {"Hello, everybody."."Of course"."It's okay to be bad."."Suit yourself."}
Copy the code
ListName = New List(of String); From {“”,””};
The same goes for Int, and the same goes for other types:
dim intList as New List(of int32) From {5.2.0}
Copy the code
Now let’s instantiate it in UiPath.
It’s very simple, just say New List(of String) in Default. I don’t need to assign an initial value, so I’m not going to write From, I’m just going to write if I need to.
3. Use of collections
UiPath has a corresponding component for array and Collection operations: Collection, which can be easily added, deleted, changed and checked.
-
Add data To Collection. Remember to select the TypeArgument, everything else.
-
Query whether a data Exists In a Collection.
-
Remove an item From a Collection.
-
Clear the Collection.
Afterword.
** Well, that’s the end of this article! Why don’t you click on it? Why don’t you click on it? Point a concern ~** have a problem please comment, private communication!
Public number [White ink is a program ape] reply [information] access to my many years of collection of various tutorials, software, e-book resources ~ (collected = learned? 2333).