How to assign a values to it


How to assign values to array,list,dictionary and how to give object reference
Give me a sample code or screenshot




Have a look here

1 Like


For assiging array use

arrVar= {“a”,“b”}

for assigning list, first initialise it

listVar= New List(Of String), if you want to have list of string datatype.
Then u can items to list using add to collection activities

for assigning dictionary, initialize like this below first

dictVar= New Dictionary(Of String,Object)

then u can add items to dictionary using activities

Hope this helps

Thanks & Regards,
Nived N

1 Like

initialise the array,List,dictionary
Datatype should select according to requirements while initialising the variable

array: new datatype() {}
List: New List(Of String)
Dic: dictVar= New Dictionary(Of String,Object)
Datatype: new datatable

How to assign values to Array,List,dictionary

array: arrVar= {“a”,“b”}
List: {" “,” "}
Dictionary:Use Assign activity to assign values in dictionary or we can use activity Add to dictionary
Dictionary(key)= value
Activity Package: Microsoft.Activities.Extensions

Datatypes must select while using these variables
datatype for Array: Array of[T]
datatype for List: mscorlib(System.collections.generic) List
Datatype for Dictionary: System.collections.generic Dictionary<Tkey,Tvalue>

Refer video in youtube: Show the Difference Between Array, List and Dictionary in UiPath with Examples - YouTube


1 Like



Please explain why we use (Cchar(Vblf))



Checkout this thread


1 Like

You should do the free training on the UiPath Academy web site. It teaches you how to do these very basic things.


Constant   Value               Description
 vbCr       Chr(13)             Carriage return
 vbCrLf     Chr(13) & Chr(10)   Carriage return–linefeed combination
 vbLf       Chr(10)             Line feed
  • vbCr : - return to line beginning
    Represents a carriage-return character for print and display functions.
  • vbCrLf : - similar to pressing Enter
    Represents a carriage-return character combined with a linefeed character for print and display functions.
  • vbLf : - go to next line
    Represents a linefeed character for print and display functions.

vbLf , vbCrLf & vbCr are used for print and display functions.

MsgBox("Hai" & vbLf & "Welcome")
MsgBox ("Hai" & vbCrLf & "Welcome")
MsgBox("Hai" & vbCr & "Welcome")

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