You should use the foreach :
foreach (string name in request.Params) {
If you really want to use a raw enumeration, then you call its GetEnumerator() method:
using (IEnumerator<string> enumerator = request.Params.GetEnumerator()) { while (enumerator.MoveNext()) { string name = enumerator.Current;
However, the foreach syntax is much clearer. Use this.
source share