2013 was an amazing year, here’s a summary!

Posted by Filip Ekberg on January 1 2014 2 Comments

Another year has gone by and it’s the third yearly summary that I’m writing, hopefully not the last one! I began the previous one that I wrote in the end of 2012 by stating that “Saying that a lot happened in 2012 is probably an understatement.”, I’d like to start this summary similarly. However it […]

Vote on HN

2012 was an amazing year, here’s a summary!

Posted by Filip Ekberg on January 8 2013 1 Comment

Saying that a lot happened in 2012 is probably an understatement. At least both on this blog and in my personal life, a bunch of amazing things have happened. I really hope that your previous year was good and let’s hope for an even better 2013. To start this year off I want to summarize […]

Vote on HN

A summary of 2011 and a look at what is about to come

Posted by Filip Ekberg on January 5 2012 5 Comments

Happy 2012 folks! I hope you all had a wonderful new years eve! The year 2011 has been very interesting, we’ve had the opportunity to see some very exciting things that is about to reach the market. I’d like to summarize what I’ve been writing about in 2011 and breifly tell you guys what’s about […]

Vote on HN

When can knowing about IL and the internals be useful?

Posted by Filip Ekberg on October 19 2011 Leave a Comment

Lately we’ve been looking a lot on how you can use IL to create types at runtime, the same IL that we have emitted at runtime is what the C# compiler compiles the C# code to. So the first thing that comes to mind when someone asks me when knowing about IL and the internals […]

Vote on HN

Creating a Dynamic Method that uses a Switch

Posted by Filip Ekberg on October 18 2011 1 Comment

We’ve looked at some very interesting Dynamic Method creation in the last posts and let’s keep this up! We’ve looked at how we can compare values and then jump somewhere if the comparison is evaluates to true. Now let’s take a look at how we can implement a switch! So I was thinking that I […]

Vote on HN

Creating a recursive dynamic method that calculates factorial

Posted by Filip Ekberg on October 17 2011 Leave a Comment

In the last post we looked at how we could call a dynamic method, now let’s have a look at how we can create a recursive method that calculates factorial for non-negative integers! First of all we should take a look at what factorial means, usually it’s written like this: 5! Which means that it […]

Vote on HN

Calling a dynamic method from a dynamic method

Posted by Filip Ekberg on October 16 2011 Leave a Comment

Let’s take a look at how we can call a method from a dynamic method. In the last post we looked at how we called a static method in our current context, but let’s take a look at how we can call another dynamically created method that takes an integer parameter and then does some […]

Vote on HN

Exploring OpCodes with DynamicMethod and looking at the evaluation stack

Posted by Filip Ekberg on October 16 2011 1 Comment

In the previous post we looked at how our DynamicMethod could pass a value to another method, let’s take a look at something a little bit more interesting! Consider that I want to have a method that takes an integer and this integer is manipulated and then printed out by this method. In this case, […]

Vote on HN

Calling a non-dynamic method with parameters from a dynamic method

Posted by Filip Ekberg on October 14 2011 Leave a Comment

I think it’s time that we explore some more OpCodes and in this post I will look at how we can call methods with parameters passed to them! There are two OpCodes that we can use to execute a method these are: OpCodes.Call OpCodes.Jmp The difference between these two are important, the first one OpCodes.Call, […]

Vote on HN

How Dynamic Methods affect resources like memory and disk space

Posted by Filip Ekberg on October 13 2011 Leave a Comment

We’ve seen how we can create static methods at runtime and one of the benefits that I’ve been talking about is that the methods will be disposed when they don’t have a reference anymore. This can be crucial if you work in an environment where memory resources are limited. So what I will do is […]

Vote on HN

Getting information about a method and its local variables

Posted by Filip Ekberg on October 12 2011 Leave a Comment

Sometimes it can be useful to get information about a method such as getting all the local variables. We’ve looked at how we can retrieve information about known types and setting / getting their values. Now let’s take a look at how we can get information about a method and it’s local variables in runtime! […]

Vote on HN

Creating static methods at runtime

Posted by Filip Ekberg on October 11 2011 5 Comments

Lately we’ve been looking at how we can get and set information on known structures during runtime, we’ve also looked at how we can invoke methods in our classes. Let’s kick it up a notch and look at how we can add static methods during runtime. This means that we want to add a method […]

Vote on HN

Setting values by using reflection

Posted by Filip Ekberg on October 10 2011 1 Comment

In all my latest posts regarding reflection all I’ve done is getting values and invoking methods and this can confuse you into thinking that when using reflection stuff is read only, but it’s not. Just as we have GetValue we also have SetValue. Consider that we have the following class: class Person {     […]

Vote on HN

Using reflection to get information about attributes on your class and properties

Posted by Filip Ekberg on October 9 2011 Leave a Comment

In the previous post I focused on getting values from an instance and getting information about the class itself. In this post I want to focus on getting even more information about the class and the properties in it, I want to get information about the attributes that I using! To get information about attributes […]

Vote on HN

What is reflection and why is it useful?

Posted by Filip Ekberg on October 9 2011 2 Comments

Lately you’ve seen me use something called reflection, but what is reflection? If we look it up on MSDN we get a quite good answer, but to the untrained eye it might be a bit cryptic: Reflection provides objects (of type Type) that describe assemblies, modules and types. You can use reflection to dynamically create […]

Vote on HN

Exploring reflection – Finding a value in any of the objects properties

Posted by Filip Ekberg on October 8 2011 4 Comments

I want to explore reflection by playing with both reflection, anonymous types and dynamically typed things all at once! My goal is not to be confusing or anything, but it is to leave out the parts that are redundant. So let’s get to it! I sometimes find myself having a lot of data that I […]

Vote on HN