Quantcast
Channel: Roger Alsing Weblog » Delegates
Browsing all 5 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

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...

View Article



Image may be NSFW.
Clik here to view.

Linq Expressions – Calculating with generics

You can find the full code for this post here: http://www.puzzleframework.com/Roger/GenericMath.cs.txt  The .NET framework lacks support for calculating with generic types. There is no way to ensure...

View Article

Image may be NSFW.
Clik here to view.

Linq Expressions – Creating objects

This post shows how you can use Linq expression trees to replace Activator.CreateInstance. but first, please note that this is a followup on Oren’s post so read it before you read mine:...

View Article

Image may be NSFW.
Clik here to view.

.NET Stateful delegates and memoization

I’ve been planning to write about stateful anonymous delegates for quite some time now so here I go :-) The common perception of anonymous delegates is that they are stateless functions used for...

View Article

Image may be NSFW.
Clik here to view.

Lambda expressions are not delegates

There is allot of confusion gotesing on in the .NET community when it comes to Lambda expressions. Allot of blog posts out there claiming that Lambdas are simply another way to write delegates, or...

View Article

Browsing all 5 articles
Browse latest View live




Latest Images