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 […]

Random Determinism

Random Determinism

This is simple but perhaps worthy of a quick post. You want something that is random, something that utilises the random number generator but is also reproducible.  Perhaps you want to be able to generate something using random numbers, and keep generating it until your happy with the result.  At this point you want to […]