What is the concept of IEnumerable <object> variable for Read Column?

Hi,

To keep it simple, if your object implement IEnumerable, you can iterate over it (with a ForEach). In other words, if something gives you an IEnumerable it provides you a mean to have its elements one by one.

I’m quite new to VB and .NET (for UiPath purposes) but I’m quite sure that ForEach expects that the objects it iterate over implement IEnumerable and an object implementing IEnumerable is able to give next element and tell that the end is reached.

Implementing an Interface is like swearing that “I guarantee that I have the methods in the contract called IEnumerable and the products are conform to that contract”.

ForEach doesn’t require a specific object type but any object that implements that Interface.

There is a lot to tell so if you need to dig into one particular aspect, please tell me.

5 Likes