Advent Of Code with scriptcs and VS Code: Day 1

I've seen the Advent of Code floating around Twitter and it looked like some fun. Once I got around to attempting to solve the riddles, I really wanted to use C#...without Visual Studio.And everyone and their family, that has an interest in coding, knows about VS Code. I've also been reading about scriptcs but never really had a use for it. That is, until now. So I jumped out and quickly installed it. Then thanks to Filip W and his blog post on the scriptcs extension for VS Code, I was able to quickly and easily use it.So here's the solution for... [Read More]

.Net 4.5 Reflection API Changes

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]