1

I'm getting a list of classes in my Assembly like this:

Type[] theseTypes = Assembly.GetExecutingAssembly().GetTypes();

and need to pass them to a method that looks like this:

o = RandomValue.Object<Lce.State.Store.Models.Events.OrderPaymentEvent>();

However I can't figure out how to call the .Object method with a type from the theseTypes array.

TIA!

Mark
  • 11
  • 1
  • Does this answer your question? [How do I use reflection to call a generic method?](https://stackoverflow.com/questions/232535/how-do-i-use-reflection-to-call-a-generic-method) – David Browne - Microsoft Jul 28 '20 at 23:07

0 Answers0