Linq Expressions – Access private fields

In this post I will show how you can use Linq Expressions to access private(or public) class fields instead of using Reflection.FieldInfo. Normally when you want to access a field by its name on a type you have to resort to reflection. You will end up with something like this: FieldInfo field = MyType.GetField(“someField”,BindingFlags.NonPublic | ….…More

Linq to NPersist to MS Access

I’ve finally seen my own Linq support Live :-P Untill now I’ve only been emitting NPath quereis and verified that NPath is correct. The reason I havent tested it live untill now is that I only have my gaming machine to develop on atm. the dev machine is dead. Anyway, I’m trying it against NWind…More

Typed factories in C#3 – Managed “new”

One thing that always bothered me with factory methods in earlier versions of C# is that the only way to make a generic factory method, you have to pass in all the constructor args as an object array. A normal factory method might look something like this: public T Create<T>(params object[] args) … And you…More