Caching results of .NET IEnumerable generator methods

If you’re already familiar with generator methods and want to jump to intelligent caching of their results, skip further down in this blog post. In C#, generator…

Uri.EscapeDataPath and HttpUtility.UrlEncode are NOT the same

For some reason Microsoft defined URI escaping twice: Uri.EscapeDataString and HttpUtility.UrlEncode seem to cover the same need. There‚Äôs another pair: Uri.EscapeUriString and HttpUtility.UrlPathEncode which again seem to…