© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
6 replies
Ownix

❔ Is there a pattern for having a single collection of different object types?

This is my sample code https://dotnetfiddle.net/ffV3vY I have a WorkflowCommand a ScheduledWorkflowCommanddepending on their type they are executed in different ways. I would like to have a collection of them I can pass around and enumerate.
Help Creating List of two types | C# Online Compiler | .NET Fiddle
Help Creating List of two types | Test your C# code online with .NET Fiddle code editor.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Collection of different classes
C#CC# / help
4y ago
❔ XML deserialise different types into a single list
C#CC# / help
3y ago
❔ Is it correct to use a single instance of Azure Front Door for different types of resources?
C#CC# / help
3y ago
Is there a concurrent ordered collection?
C#CC# / help
4y ago