Missing method - Parsing GetProcess ouput

Hi folks,

In our RPA team we have come across a situation a couple of times that has us scratching our heads and was hoping someone could shed some light on what is going on.

In the examples attached GetProcesses is being run and each item is being parsed and output to Write Line.
However, in the ProcessName xaml, Write Line item. gives the full set of methods including item.ProcessName whereas in the ToString xaml only four methods are available after item. including ToString

This is the second instance we have seen and the other instance was using ienumerable. Both times the variables used were using identical types and we recreated the examples to confirm this.

Does anyone have any idea what might be going on here?

ProcessName.xaml (5.9 KB) ToString.xaml (5.0 KB)

Many thanks!

Hi there @alfalfi

All kinds of methods are based on (available from) the dependencies and type arguments.

If your loop is taking in “System.Diagnostics.Processes” type for the item argument from the IEnumerable collection then all those methods will be available in the method list after 'item.

Your second xaml has type argument as Object which has four available methods for whichever item you are trying to convert/get info about.

So change it to “System.Diagnostics.Processes” for you desired methods.

Regards :slight_smile:

Awesome - thanks, Ragha! I had a bit of a duh moment when I read your reply! We had been working on the assumption that the item object was inheriting type from the collection and didn’t have its own specific type.

You’re welcome, and I totally understand as I have waded past such moments too (sometimes in secret and sometimes glaringly public :smiley:)

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