Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
You could also use nested arrays to save some keystrokes, like var data = new[] { new []{"device-type", "mobile"}, ...} and create the string with string.Join(";", data.Select(kvp => string.Join("=", kvp)));. Using KeyValuePair is quite verbose (but also less prone to errors).
Well, you could use a SortedDictionary and Last instead of First; but the only advantange over a simple array would be the nice collection initializer syntax instead of using an anonymous type.
Thank you very much for your answer. I've written the parser from scratch just to write a parser from scratch and to write some non-trivial clojure code for learning clojure :-)