社区
C#
帖子详情
c#中怎样用arrylist?
tiantianxiaoqiang
2010-01-29 03:44:16
private void button1_Click(object sender, EventArgs e)
{
ArrayList myarray = new ArrayList();
}
这要写,报错,提示找不到类型或者命名空间
...全文
381
9
打赏
收藏
c#中怎样用arrylist?
private void button1_Click(object sender, EventArgs e) { ArrayList myarray = new ArrayList(); } 这要写,报错,提示找不到类型或者命名空间
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
9 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
JOCLI
2010-01-29
打赏
举报
回复
using System.Collections;
toxuecheng111
2010-01-29
打赏
举报
回复
下面的ArrayList的一些用法 楼主可以参考一下
http://blog.csdn.net/yc_8301/archive/2008/03/30/2230592.aspx
mengfanzongfox
2010-01-29
打赏
举报
回复
[Quote=引用 4 楼 toxuecheng111 的回复:]
using System.Collections;这样就可以使用了
[/Quote]up
qlzf11140820
2010-01-29
打赏
举报
回复
System.Collections.ArrayList myarray = new System.Collections.ArrayList();
qqzeng-ip
2010-01-29
打赏
举报
回复
你输入ArrayList过程中应该是有提示的,没有提示可能你没有输入命名空间using System.Collections.Generic;加上后就没有问题了
或者一楼!
toxuecheng111
2010-01-29
打赏
举报
回复
using System.Collections;这样就可以使用了
zsz1001
2010-01-29
打赏
举报
回复
[Quote=引用 1 楼 koukoujiayi 的回复:]
using System.Collections;
[/Quote]
引用
qlzf11140820
2010-01-29
打赏
举报
回复
System.Collections.ArrayList myarray = new ArrayList();
koukoujiayi
2010-01-29
打赏
举报
回复
using System.Collections;
C#
中
的集合之
Arry
List
List
泛型集合 集合是OOP
中
的一个重要概念,
C#
中
对集合的全面支持更是该语言的精华之一。 为什么要用泛型集合? 在
C#
2.0之前,主要可以通过两种方式实现集合: a.使用Array
List
直接将对象放入Array
List
,操作直观,但由于集合
中
的项是Object类型,因此每次使用都必须进行繁琐的类型转
c#
语法之
Arry
List
/* * *1,配置--修改电脑的系统环境参数 *我的电脑->內容->高级->环境参数
中
的系统参数
中
的path后面加上";"号再加上"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727"后这时候在cmd环境下就可以直接使用csc来編译. * * Created by SharpDevelop. * User: Administ...
c#
Arry
List
键值对
1 Array
List
List
1)新建Array
List
Array
List
list
= new Array
List
(); 2)添加单个元素
list
.Add(true); ist.Add(1);
list
.Add("张三"); 3)添加集合元素
list
.AddRange(new int[] { 1, 2, 3, 4, 5, 6, 7,
C#
Arry
List
实例
C#
Arry
List
实例
Arry
List
的声明,添加元素,删除元素,遍历元素,以及
Arry
List
的转化为一维指定数组 代码及详解如下: using System;using System.Collections.Generic;using System.Text;using System.Collections; namespace ArrayOf
Arry
List
{ cla...
C#
中
Hashtable和
Arry
List
的理解
1.HashTabe 在.NET Framework
中
,Hashtable是System.Collections命名空间提供的集合对象,同时它也是一个可变长的数组,用于处理和表现类似key/value的键值对,其
中
key通常可用来快速查找,同时key是区分大小写;value用于存储对应于key的值。Hashtable
中
key/value键值对均为object类型,所以Has...
C#
111,120
社区成员
642,545
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章