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

推荐订阅源

Jina AI
Jina AI
V
Vulnerabilities – Threatpost
Security Latest
Security Latest
AI
AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
H
Help Net Security
Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
L
LINUX DO - 最新话题
A
Arctic Wolf
博客园_首页
S
Securelist
S
Secure Thoughts
Google DeepMind News
Google DeepMind News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Cyberwarzone
Cyberwarzone
小众软件
小众软件
T
Threatpost
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Blog — PlanetScale
Blog — PlanetScale
N
News and Events Feed by Topic
NISL@THU
NISL@THU
Forbes - Security
Forbes - Security
博客园 - 聂微东
F
Fortinet All Blogs
Simon Willison's Weblog
Simon Willison's Weblog
H
Heimdal Security Blog
罗磊的独立博客
S
Security @ Cisco Blogs
B
Blog
T
Troy Hunt's Blog
Engineering at Meta
Engineering at Meta
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Hacker News
The Hacker News
The Last Watchdog
The Last Watchdog
Hacker News - Newest:
Hacker News - Newest: "LLM"
I
Intezer
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
The Cloudflare Blog
S
Schneier on Security
月光博客
月光博客
L
LINUX DO - 热门话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org

博客园 - 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();
        }

    }

}