Benchmarking 4 reflection methods for calling a constructor in .NET

added by DotNetKicks
6/1/2021 10:39:37 AM

940 Views

The typical way to create an object in .NET/C# is to use the new keyword. However it's also possible to create a new instance of an object using reflection. In this post I compare 4 different methods, and benchmark them to see which is fastest.


0 comments