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

推荐订阅源

Jina AI
Jina AI
C
Cybersecurity and Infrastructure Security Agency CISA
美团技术团队
J
Java Code Geeks
博客园 - 聂微东
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
雷峰网
雷峰网
爱范儿
爱范儿
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
腾讯CDC
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
The Cloudflare Blog
博客园 - Franky
Engineering at Meta
Engineering at Meta
IT之家
IT之家
Last Week in AI
Last Week in AI
Recent Announcements
Recent Announcements
The Register - Security
The Register - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
The Exploit Database - CXSecurity.com
I
Intezer
V
Vulnerabilities – Threatpost
Simon Willison's Weblog
Simon Willison's Weblog
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
T
Tenable Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Project Zero
Project Zero
H
Hacker News: Front Page
SecWiki News
SecWiki News
L
LINUX DO - 最新话题
Hacker News: Ask HN
Hacker News: Ask HN
Forbes - Security
Forbes - Security
C
CERT Recently Published Vulnerability Notes
T
Threatpost
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V2EX - 技术
V2EX - 技术

博客园 - jeky

rails 路由配置时 URL 地址如何匹配下划线? github.com 不能访问怎么办? Linux - 显示日历的命令 cal 用法 Linux - echo 命令如何追加文本? 如何解决ssh连接后长时间不操作断线的问题? Rails 中如何使用全局变量? raw 允许输出html字符 Linux 用户及组 话说调试 全等(===) 委托的协变与逆变 判断一个整数是奇数还是偶数 - jeky - 博客园 选择排序法 让我笔试吃亏"单例模式" 用Javascript实现关键词的高亮显示 Javascript中正则表达式的相识知识 对 TextBox 设置css属性 注意void()里面不能空 - jeky - 博客园 OWC11 实例 Internet Explorer 7.0(IE7.0)简体中文版
访问数组元素的 3 种方法
jeky · 2006-12-03 · via 博客园 - jeky

        // 数组的声明及赋值
        string[] sa = "jeky""apple""august" }


        
// ----------------------- 使用迭代访问元素

        IEnumerator ie 
= sa.GetEnumerator();
        
while(ie.MoveNext())
        
{
            TTT(ie.Current.ToString());
        }


        
// -------------------- 使用 for

        
for (int i = 0; i < sa.Length; i++)
        
{
            TTT(sa[i]);
        }


        
// --------------------- 使用 foreach  in 

        
foreach (string s in sa)
        
{
            TTT(s);
        }

附:TTT() 方法相当于 Response.Write () 。