惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
N
News and Events Feed by Topic
S
Schneier on Security
G
GRAHAM CLULEY
Scott Helme
Scott Helme
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
CERT Recently Published Vulnerability Notes
T
The Exploit Database - CXSecurity.com
C
Cisco Blogs
T
The Blog of Author Tim Ferriss
Cisco Talos Blog
Cisco Talos Blog
P
Privacy & Cybersecurity Law Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
Blog — PlanetScale
Blog — PlanetScale
Project Zero
Project Zero
MyScale Blog
MyScale Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
The Last Watchdog
The Last Watchdog
Vercel News
Vercel News
The Cloudflare Blog
C
Check Point Blog
Help Net Security
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
腾讯CDC
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
S
SegmentFault 最新的问题
MongoDB | Blog
MongoDB | Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
AWS News Blog
AWS News Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
S
Securelist
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Vulnerabilities – Threatpost
S
Secure Thoughts

博客园 - luckyzmw

ASP.net里大文件上传的问题讨论 E680最强综合技巧集合 E680I常用工具和使用说明 Code Snippet Libraries压缩下载包 企业库中的一个小发现 企业库中的objectBuild类分析 企业库core中configuration部分类的分析 如何创建一个自定义帐户来运行 ASP.NET 新手学习XSL的好东西 UML相关的工具 广告管理系统的UML分析与设计 几家最好的IT公司面试全揭秘 ASP.NET常用代码 多线程的简单示例 Microsoft Windows Workflow Foundation 入门:开发人员演练 为何使用表格排版是不明智的 Fitch and Mather 7.0 概述 MAVERICK.NET好用吗 ASP.NET下MVC设计模式的实现
NameValueCollection的用法
luckyzmw · 2005-12-11 · via 博客园 - luckyzmw

此集合基于 NameObjectCollectionBase 类。但与 NameObjectCollectionBase 不同,该类在一个键下存储多个字符串值。

该类可用于标头、查询字符串和窗体数据。

using System;

namespace ConsoleApplication5
{
    
/// <summary>
    
/// Class1 的摘要说明。
    
/// </summary>

    class Class1
    
{
        
/// <summary>
        
/// 应用程序的主入口点。
        
/// </summary>

        [STAThread]
        
static void Main(string[] args)
        
{
            System.Collections.Specialized.NameValueCollection c 
= new System.Collections.Specialized.NameValueCollection();
            c.Add(
"a","a");
            c.Add(
"1","3");
            c.Add(
"z","z");
            c.Add(
"1","1");
            c.Add(
"d","d");
            
            
for (int i=0; i<c.Count; i++)
            
{
                
foreach (string str in c.GetValues(i))
                
{
                    Console.WriteLine(str);
                }

            }

            Console.ReadLine();
        }

    }

}