Learning F# while trying to do something useful at the same time, so this is kind of basic question:
I have req, which is a HttpListenerRequest, which has QueryString property, with type System.Collections.Specialized.NameValueCollection. So, for sake of clarity let’s say, I have
let queryString = req.QueryString
Now I want to produce nice string (not printf to console) from contents of that, but queryString.ToString() is not overriden apparently, so it just gives string “System.Collections.Specialized.NameValueCollection”.
So, what’s the F# one-liner to get a nice string out of that, like “key1=value1\nkey2=value2\n…”?
1 Answer