public static void Test_WebHeader_02() { string file = @"http\header_01.json"; string file2 = @"http\header_02.json"; file = zPath.Combine(_directory, file); file2 = zPath.Combine(_directory, file2); WebHeaderCollection headers = new WebHeaderCollection(); headers.Add("xxx", "yyy"); headers.Add("xxx", "yyy222"); headers.Add("zzz", "fff"); headers.Add("yyy", "ttt"); for (int i = 0; i < headers.Count; ++i) { string key = headers.GetKey(i); foreach (string value in headers.GetValues(i)) { Trace.WriteLine("{0}: {1}", key, value); } } //headers.zSave(file); BsonDocument doc = headers.ToBsonDocument(); doc.zSave(file); }