Prohibs operation of type object for operator '+'

Hi everyone I need you help quick on this activity…


I was using windows compatibility before it didn’t give me any errrors and I used the same activity same operator but now this is legacy. How do i go about fixing this, someone assist tried looking for a solution but non

Try to use an assign varible before to use it, and you only use this new varible in the Type activity

@Benjamin_Vazquez1 how do I use it please show an example for this situation, what to assign?

Sure, something like this
image

or don’t use “+” try to use Path.Combine(Environment.CurrentDirectory,CurrentItem)

1 Like

@Anelisa_Bolosha

looks like your for loop type argument is object…please change it to string

or else use Path.Combine(Environment.CurrentDirectory,Currentitem.ToString)

The issue is because Environment.Currentdirectory is of string type and currentitem is out object…you cna convert object to string usign .ToString method

and generally for combining paths it is good to use path.Combine instead of combining directly to avoid extra slashes(/)

hope this helps

cheers

1 Like

Cheers thank you, it worked turned out my Foreach TypeArgument was an object…so i changed it to a string

1 Like

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