In the previous video, you learned about dictionaries and the different methods for manipulating them. In this video, you will learn how to work with dictionaries using different methods. In this demonstration, we will create a dictionary that contains names of different countries and their capitals. We will then use methods to add values in the dictionary and retrieve and remove values from it. I would encourage you to go through this demonstration video and attempt to repeat it on your own. In UiPath Studio, search for an Assign Activity in the Activities panel and drag and drop it in the Designer panel. Rename and annotate the sequence. Also, rename the Assign Activity. Now, open the Variables panel. In the Name column, create a new variable named Country Capital. Then in the Variable Type column, click the browse for Types Option from the drop-down menu. In the pop-up window, search for Dictionary and select Dictionary under Systems.Collections.Generic. Now, we need to choose the type of key and value pairs we want to store. Our dictionary will have country and capitals, which are strings. In the boxes that appeared on top of the window, select String from the drop-down menu. Click Ok. Close the Variables panel. Now, in the two text box of the Assign Activity, enter Country Capital. Click the ellipsis icon of the value property from the Properties panel and enter the expression New Dictionary(Of String, String). This expression initializes the dictionary. Now, let's extend this expression. Type from (("Australia," "Sydney,)" ("UK", "London")) This expression stores two countries and their capitals in the dictionary. Click OK to close the window. Now, we will use the method to count the number of values currently stored in the dictionary. Drag and drop a message box activity below the Assign Activity. Rename the activity. In its textbox, enter the expression "Count: "+CountryCapital.Count.ToString. Now, we will retrieve the capital of Australia using three methods. Let's see the first method. Drag and drop a message box activity. Rename the activity. In its textbox, enter the expression "Capital of Australia is : "+CountryCapital ("Australia").ToString. Now, we will retrieve the capital of Australia using the second method. Drag and drop a message box activity. Rename the activity. In its textbox, enter the expression "Capital of Australia using item method is: "+CountryCapital item("Australia").ToString. Now, we will retrieve the capital of Australia using the third method. For this method, your UiPath Studio must have Microsoft.Activities.Extensions. If it is installed, you can find it under the Project Dependencies tab in Managed Packages or you have to install it from the All Packages tab. Drag and drop a Get from Dictionary activity. In the pop-up that appears, select String from both the drop-down menus and click Ok. Rename the activity. In the first textbox of the activity, enter CountryCapital. In the second textbox, enter "Australia". In the third textbox, press Control K on your keyboard and type Australia capital. The retrieved value of Australia will be stored in the variable Australia capital. Now, drag and drop the message box activity, rename the activity. In its textbox, enter the expression "Capital of Australia using the Get from Dictionary activity is: "+AustraliaCapital. Now, let us run this workflow. You can see that a message box displays the number of key-value pair in the dictionary, which is two. Click OK. The next message shows the capital of Australia using the first method. Click OK. The next message shows the capital of Australia using the second method. Click OK. The next message shows the capital of Australia using the third method. Click OK. Now, we will add new data in the dictionary. Let's remove all the Message box activities and the Get from Dictionary activity. Now drag and drop and add to Dictionary activity. In the pop-up that appears, select String from both the drop-down menus and click OK. Rename the activity. In the first text box, enter CountryCapital. In the second text box, enter "USA" In the third text box enter "Washington DC". Now drag and drop a message box activity. Rename the activity. In its text box, enter the expression "USA is in the dictionary : "+CountryCapital.ContainsKey("USA").ToString. This expression will look for USA in the dictionary and return True if found and False, if not found. Now we will remove USA and its values from the dictionary. Drag and drop every move from Dictionary Activity. In the pop-up that appears, select String from both the drop-down menus and click OK. Rename the activity. In the first text box enter CountryCapital. In the second text box enter "USA". In the third text box, press Control plus K and enter remove USA. The Remove USA variable will store true as its value if the USA was present in the dictionary and deleted, and it will store false if the USA is not present in the dictionary. Now, drag and drop a message box activity. Rename the activity. In its text box, enter the expression "USA is removed: "+RemoveUSA.ToString. Now drag and drop another message box activity. Rename the activity. In its text box, enter the expression CountryCapital("USA").ToString. This expression will look for the value of USA in the dictionary and the UiPath Studio will throw an error if USA is not found. Let's run the activity. You can see that a message box shows the confirmation of USA being present in the dictionary. Click OK. The next message shows the confirmation that the USA is removed from the dictionary. Click OK. Now an error window says that the given key was not present in the dictionary. It is because we removed USA from the dictionary using the Remove from Dictionary activity. That brings us to the end of this video. Thank you for watching. Goodbye.