1) Numeric:
Used to store numbers. There are different sub-types of numerical variables:
- Int32 - System.Int32 (signed integers): 10, 299, -100, 0x69
- Long - System.Int64 (long integers): 5435435343O, -11332424D
- Double - System.Double (allows decimals, 15-16 digits precision): 19.1234567891011
2) Boolean:
System.Boolean: Used to store one of two values – true or false.
3) String:
System.String: Used to store text. This type of data comes with many specific methods of processing, namely Data Manipulation
4) Date and Time:
- DateTime - System.DateTime: Used to store specific time coordinates (mm/dd/yyyy hh:mm:ss). This kind of variable provides a series of specific processing methods (subtracting days, calculating time remaining vs. today, and so on). For example, to get the current time, assign the expression DateTime.Now to a variable of type DateTime.
- TimeSpan - System.TimeSpan: Used to store information about a duration (dd:hh:mm:ss). You can use it to measure the duration between two variables of the type DateTime. For example, you can save the time at the start of the process in one variable (of type DateTime), the time at the end in another (of type DateTime) and store the difference in a variable of type TimeSpan.
5) Collection
This category reunites all the collections of objects, with each object being identified through its index in the collection. Collections are largely used for handling and processing complex data. Some of the most encountered collections are:
- Array - ArrayOf<T> or System.DataType[]: used to store multiple values of the same data type. The size (number of objects) is defined at creation;
- List - System.Collections.Generic.List<T>: used to store multiple values of the same data type, just like Arrays. Unlike Arrays, their size is dynamic;
- Dictionary - System.Collections.Generic.Dictionary<TKey, TValue>: used to store objects in the form of (key, value) pairs, where each of the two can be of a separate data type.
6) GenericValue
This is a UiPath proprietary variable type that can store any kind of data, including text, numbers, dates, and arrays. This type is mainly used in activities in which we are not sure what type of data we will receive, yet in general the use of this is temporary.
No comments:
Post a Comment