using System;
using System.Net;
using System.Collections;
class Test {
?[STAThread]
?public static void Main(string[] args) {
??Uri u = new Uri("http://www.apache.org");
??HttpWebRequest rget = (HttpWebRequest)WebRequest.Create(u);
??HttpWebResponse hwr = (HttpWebResponse)rget.GetResponse();
??WebHeaderCollection head = hwr.Headers;
??IEnumerator iem = head.GetEnumerator();
??int i=0;
??string[] values;
??string key;
??while ( iem.MoveNext() ) {
???key = head.GetKey(i);
???values = head.GetValues(key);
???i++;
???Console.WriteLine("{0}\t {1}", key, String.Join(",", values));
??}
??Console.ReadLine();
?}
}