If I got your intent, instead of Action
you need to use delegate which returns some data. E.g. Func<object>
:
var factories = new List<Func<object>>();
factories.Add(() => new ClsA());
factories.Add(() => new ClsB());
factories.Add(() => new ClsC());
Then you can create objects in a loop:
foreach(var factory in factories)
{
var obj = factory();
//
}
If ClsA, ClsB, ClsC inherit some base type, you can use that type as Func generic type parameter.