Saturday, December 26, 2009

Challenge yourself

I have been participating in some contests in december by submitting some code to microsoft. The following is two of my contributions that weren't picked as the winner.

The assignment for my first contribution was to make an extension method for one of the new types in .net 4.0. What I made was an extension method that would return a text presentation of a BigInteger in whatever base you want (16 being the maximum as I don't know any standard for higher bases).



The second assignment was to implement group functionality for collections that would take several properties to group by. I chose to make an extension method that would take strings as input and group the collection by the values of the properties identifier by the strings. The result is a collection that contains a collection for each group. This was my first time for using Linq together with reflection.




No comments:

Post a Comment