I got a request from one of the lecturers at Technikon to write an application that will calculate the lack of cohesion in methods of a particular class.
The API I am developing currently performs alot of nifty functions such as parsing a .csproj file and extracting the referenced assemblies and source code needed to compile the assembly.
Programmatically the assembly gets compiled and the methods and fields extracted. The interesting bit was getting the method body and actually translating into a more readable form as I needed to check which methods references which fields and how many times.
.NET2.0 provides you with a nice function called MethodInfo.GetMethodBody().GetILAsByteArray(). This is not in a readable format. Translating it to a more readable format was done using System.Reflection.Emit.
To cut a long story short, it is alot of fun to play around with these type of things other than coding graphics applications.
Here is a screenshot of the application. It will get cleaned up at some stage.