There are 8 entries for the tag .NET
T’is the season for “Year in Review” and “Best of” blog posts. It’s a vain practice, to be sure. This is exactly why I’ve done it almost every year! After all, isn’t all blogging pure vanity? Sadly, I did miss a few years when my vanity could not overcome my laziness. This year I am changing it up a bit to look at some of the highlights, in my opinion, that occurred in 2011 with open source software and the .NET community. I think it’s been a banner year for OSS and .NET/Microsoft, and I think it’s only going...
I’ve been relatively quiet on my blog lately in part because of all the work on ASP.NET MVC. However, the ASP.NET team is a relatively small team so we often are required to work on multiple features at the same time. So part of the reason I’ve been so busy is that while we were wrapping up ASP.NET MVC, I was also busy working on a core .NET Framework feature we plan to get into the next version (it was a feature that originated with our team, but we realized it belongs in the BCL).
The goal of the feature is...
I think Miguel de Icaza nails it regarding some of the FUD being written about Microsoft’s latest move to make the source code to the .NET Framework available under the Microsoft Reference License (Ms-RL). In fact, his post inspired me to try my hand at creating a comic. I have no comic art skills (nor comic writing skills), so please forgive me for my lack of talent (click for full size)... I know some of the people involved who made this happen and I find it hard to believe that there were nefarious intentions involved. You have to...
How often do you see code like this to create a file path?
public string GetFullPath(string fileName)
string folder = ConfigurationManager.AppSettings["somefolder"];
return folder + fileName;
Code like this drives me crazy because it is so prone to error. For example, when you set the folder setting, you have to remember to make sure it ends with a slash. Having too many things to remember makes this setup fragile.
Sure, you write some code to ensure that the folder has an ending slash, but I’d rather let someone write that code. For example, Microsoft.
The .NET framework is definitely huge so it can...
Google Code Search is truly the search engine for the uber geek, and potentially a great source of sublime code and sublime comments. K. Scott Allen, aka Mr. OdeToCode, posted a few choice samples of prose he found while searching through code (Scott, exactly what were you searching for?).
One comment he quotes strikes me as a particularly good point to remember about using locks in multithreaded programming.
Locks are analogous to green traffic lights: If you have a green light, that does not prevent the idiot coming the other way from plowing into you sideways; it merely guarantees to you that the...
Dan Appleman takes the .NET focused custom search engine idea one step further by grabbing a great domain name for his search engine. Now why didn’t I think of that! Sometimes that’s all it takes between a search engine that will get used alot (his) and one that won't (mine). I'd be happy to throw my support over to his, though I’m keeping my baby. The one key difference is I plan to leave my search engine open for others to contribute sites. Perhaps the two will complement each other. And no, the domain name is not the only reason. This guy *is*...
Right now, there is no easy way to convert a time from one arbitrary timezone to another arbitrary timezone in .NET. Certainly you can convert from UTC to the local system time, or from the local system time to UTC. But how do you convert from PST to EST? Well Scott Hanselman recently pointed me to some ingenious code in DasBlog originally written by Clemens Vasters that does this. I recently submitted a patch to DasBlog so that this code properly handles daylight savings and I had planned to blog about it in more detail later. Unfortunately, we recently found out that changes...
Keyvan Nayyeri has a great tip for how to control the display of a type in the various debugger windows using a DebuggerTypeProxy attribute. His post includes screenshots with this in use.
This is an attribute you can apply to a class, assembly, or struct to specify another class to examine within a debugger window.
You still get access to the raw view of the original type, just in case some other developer plays a practical joke on you by specifying a DebuggerTypeProxy that displays the value of every field as being 42.
Tags: .NET, C#, Debugging, Visual Studio.NET,