How to create object ype variable in uipath

hi Guys
Please help me out how could I create object type of variable in uipath and how can I use oftype method I found this code below code and I need to apply this into uipath

Private Shared Sub Sample_OfType_Lambda()
Dim objects As Object() = {“Thomas”, 31, 5.02, Nothing, “Joey”}

Dim result = objects.OfType(Of String)()

Debug.WriteLine("Objects being of type string have the values:")
For Each str As String In result

End Sub

as a quick shot
result - string array
object - object array


objects.OfType(Of String).toArray
we would recommend for getting returned a string array

how could I create in uipath can you please share any example ?


Hi @Aleem_Khan
Please try this syntax
new Object() {“a”,“b”,“c”} in variable panel

I tried but it not working

What is the error you are getting?

Hi peter could you please help me for that

Can you please share and workflow

Will have a Look on it once im Back from travelling

Kindly note all screenshots provided by me from above were done within uipath.

refering to your screenshot and the default value: An initialization of an object array can be done as following:

new Object() {“a”,“b”,“c”,“d”,“e”} or in short {“a”,“b”,“c”,“d”,“e”}

However this is similar what was mentioned above. In case of it is not working so please also provide details of the issues when it is requested. Thanks