1. Change the ArrayList into a List
2. Specify the correct StringComparer - Ordinal in this case.
Listlist = new List (headers.Count); foreach (string key in headers.AllKeys) { string lowerKey = key.ToLower(); if (lowerKey.StartsWith("x-amz-")) { list.Add(lowerKey); } } // Using the recommendations from: // http://msdn.microsoft.com/en-us/library/ms973919.aspx list.Sort(StringComparer.Ordinal);
No comments:
Post a Comment