122
C++ try not to add footguns challenge (impossible)
(lemmy.world)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
You can also optimize this a bit.
You can use Activator.CreateInstance instead of reflecting and invoking the constructor.
You can also call MethodInfo.Invoke, you don't need to create a delegate.
Also worth noting that Source Generators have replaced the need for reflection in many cases.