How to Convert Object data type into Array or IEnumerable?

I have a variable of Object type. The values that it holds are of System.Object type. I have checked by using the GetType method. When I used the for loop to iterate through the values there is compiler error - Option strict on disallows conversions from Object to System.Collections.IEnumerable. I am unable to read the values inside this variable.

Note: I am using the Get Object Properties activity which available inside the ActiveDirectoryDomainService package. The output of this property gets saved in the variable of type object. If there is only single value then there is no problem but if there is an array of object then how to get those values.
Screenshot (32)

Hi,

Can you try the following expression ?

CType(dirReports,object())

Regards,

1 Like

Thanks for the solution

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