I'm a little behind on the game, but it looks like the .Net Reflection APIs changed in 4.5 http://t.co/7PYN1e3ksN— Carlo Wahlstedt (@carlowahlstedt) January 29, 2015 Thought I'd share a few examples of changes when converting to .Net 4.5. The pre-4.5 version is on top and the 4.5 version is on the bottom.GetRuntimeMethodstypeof(Extensions).GetMethod("methodName")typeof(Extensions).GetRuntimeMethods().Where(t => t.Name == "methodName").FirstOrDefault()GetRuntimePropertiesitem.GetType().GetMember("memberName");item.GetType().GetRuntimeProperties().Where(t => t.Name == "memberName");anditem.GetType().GetProperties();item.GetType().GetRuntimeProperties();GetTypeInfo - ExtensionMake sure you add a using for System.ReflectionmemberExpression.Member.DeclaringType.IsAssignableFrom(item.GetType())memberExpression.Member.DeclaringType.GetTypeInfo().IsAssignableFrom(item.GetType().GetTypeInfo())GetCustomAttribute(CustomCreatedAttribute)Attribute.GetCustomAttribute(item.GetType(), typeof(CustomCreatedAttribute));item.GetType().GetTypeInfo().GetCustomAttribute<CustomCreatedAttribute>();
[Read More]
Standing Desk 1.0 (Minimum Viable Product)
Thanks to a presentation that Joe Kutner did at devLink 2013 and his book The Healthy Programmer, I've been wanting a standing desk for some time now. The problem is a few years back I spent a decent amount of money on a nice wooden desk. Not wanting to replace my nice desk, that my wife bought for me as a present, I began to look for alternatives.Desk MountsI had three real problems with these and two relate to how they attach to the desk. The first is that my desk is next to a window ceil. The extension up...
[Read More]
Tracking Steps and More: Fitbit Flex vs LG G Watch
A little while back I purchased an LG G Watch because it was a good deal. However, this also means that it wasn't a brand new product. Not wanting to gift something that had issues, I wore the watch for a few days.Let me first step back and say, I've been wearing a Fitbit Flex for about six months now. It's been extremely useful for me because it not only tracks how active I am, but also the quality and quantity of my sleep. My one complaint about it is that when wearing something on my wrist, I'd prefer that...
[Read More]