Archive for url tag
URL parsing and manipulation in .NET
While .NET has a URI class it’s not great. They don’t expose the various parts as properties and you can’t manipulate them either. Many projects I’ve seen (Subtext included) just try and manipulate them via strings which varying degrees of success.
Here’s a C# .NET URL decoder that uses a regular expression I developed for performance based on a VBScript class I developed a while back. Comments and white space have been removed to keep it short.
There were some odd bugs in this class. It is currently being revised and unit tests written. It should turn up later this month (June 2011)
[)amien