Is it feasible to develop a custom "for each" activity by utilizing LINQ as the underlying technology?

I am considering building a custom activity using C#. I have already created a few activities, but I am looking for more ideas to reduce development time or process execution time.

One idea I have is to create an activity that incorporates LINQ. I m thinking of creating a “for each” activity with a scope that use linq as a base. Although I am not very familiar with LINQ, I believe I can create something that will be helpful for me, my company, and the community.

Could someone please guide me on how the “for each” works in LINQ? Additionally, any new ideas for a custom activity would be appreciated.

Hi @indiedev91

Here’s an example of how to use foreach with LINQ to loop through a collection of strings and display only the strings that start with the letter “A”:

List strings = new List { “Apple”, “Banana”, “Apricot”, “Cherry” };
var filteredStrings = strings.Where(s => s.StartsWith(“A”));

foreach (var str in filteredStrings)
{
Console.WriteLine(str);
}