Object Creation using Lambda Expressions Part 2

Object Creation using Lambda Expressions Part 2

In my previous post I talked about Lambda Expressions to create objects instead of Activator.CreateInstance. Object Creation using Lambda Expressions Part 1 At the end of that post I said I would refactor the code into a static class with helper methods to facilitate ease of use. In the following class there are two helper […]

Object Creation using Lambda Expressions Part 1

Object Creation using Lambda Expressions Part 1

Object creation using Lambda Expressions, a fast alternative to Activator.CreateInstance. When it comes to creating objects of a generic type the typical solution is to use Activator.CreateInstance. The solution does provide a simple way of creating generic objects, but it comes at a performance cost.  It is relatively slow to create an object this way and in […]