Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Return a NameValueCollection From A HTTP Header

AddThis Social Bookmark Button
        public static NameValueCollection HeaderNameValueCollection(this string header)         {             var nameValueCollection = new NameValueCollection();             Regex.Matches(header, @"(\w+)="".*?""").Cast().Select(x => x.Value.TrimEnd('"').Split(new[] { "=\"" }, StringSplitOptions.None)).ForEach(x => nameValueCollection.Add(x[0], x.Length == 2 ? x[1] : string.Empty));             return nameValueCollection;         }

Home : Blog List : .Nettuce : Return a NameValueCollection From A HTTP Header