BC30198: ')' expected

Hello team,

I am following the training on working with lists: Data Manipulation with Lists and Dictionaries in Studio Course | UiPath Academy

I created a variable SpainCities and set the variable type: System.Collections.Generic.List<System.String> then added (“MADRID”,“valencia”,“BARCELONA”) as a default initial values.
To initialize the list I type: new List(of String) from (“MADRID”,“valencia”,“BARCELONA”) as explained in the training.
but it does not validate and i get an error BC30198: ‘)’ expected

I am not sure how to solve this error, it just drives me crazy :face_exhaling:

your help is highly appreciated.

Thanks,

Fadi

Hi,

Can you try to use { } instead of ( ) as the following?

New List(Of String)From{"MADRID","valencia","BARCELONA"}

Regards,

1 Like

Can you show us a screenshot of the training? Cause thats wrong, as stated it should be {} not ().

If the training has a mistake we should report it.

Hi @Fadi

initialize a List(Of String) with default values, try this syntax:

New List(Of String) From {“MADRID”, “Valencia”, “BARCELONA”}

Happy Automation