您当前的位置: 百科371电脑/网络C#/.NET → 电脑/网络内容 退出登录 用户管理 用户注册
本类热门文章
相关文章
中原建材网
急急急!!!ArrayList的用法

减小字体 增大字体

问题:急急急!!!ArrayList的用法  

using System;
using System.Collections;

public class Test
{
static void Main()
{
//最讨厌看可读性差的代码即使是试验或者是临时

ArrayList arrLists = new ArrayList();
object[] objParams1 = new object[2];
objParams1[0] = "@mode";
objParams1[1] = "Add";
arrLists.Add(objParams1);

object[] objParams2 = new object[2];
objParams2[0] = "@RowID";
objParams2[1] = 1;
arrLists.Add(objParams2);

foreach (object[] obj in arrLists)
{
Console.WriteLine(obj[0]+" "+obj[1]);

foreach (object obj2 in obj)
{
Console.WriteLine(obj2);
}
Console.WriteLine("\n\n");
}

Console.Read();
}
}

如果你对急急急!!!ArrayList的用法这个问题有好的意见或 建议,请留言
[] [返回上一页] [打 印]
电脑/网络评论 (评论内容只代表网友观点,与本站立场无关!)

用户名: 查看更多评论

分 值:100分 85分 70分 55分 40分 25分 10分 0分

内 容:

         (注“”为必填内容。) 验证码: 验证码,看不清楚?请点击刷新验证码

中原建材网 简单版 站长QQ:382546553