In researching how to convert a NameValueCollection to a querystring, I have come across different methods. I am curious if the shorter lambda syntax is as efficient as it coul
NameValueCollection's ToString
method will build the query string for you. I haven't done any benchmarking, but I'd imagine the implementation would be more efficient than something using lambdas or foreach.
(The ToString
solution doesn't seem to be well-documented; I only found it because this answer used it in a code sample.)