C#.net从表中收集数据 [英] C#.net collecting the datas from table

查看:69
本文介绍了C#.net从表中收集数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b我想知道从表中收集数据集的方法是什么。我知道Arraylist,List,XpCollection。还有其他方法吗?

Hi i want to know what are the ways to collect the collection of datas from table. I know Arraylist,List, XpCollection. is there any other ways?

推荐答案

Hello Sencsk,



每个集合(或通用集合,并发收藏等)有它自己的目的,优点和缺点。



如果没有您的需求规格,我会提供从字典到数组。

如果您只是想收集有关收藏品的调查,请尝试:



IList 界面适用于价值集合。以下是实现它的集合列表:



系统。数组

System.Collections。 ArrayList

System.Collections.Specialized。 StringCollection



界面 IDictionary 用于(Key,Value)对的集合。以下是实现它的集合列表:



System.Collections。 Hashtable

System.Collections。专业。 ListDictionary

System.Collections。 SortedList

System.Collections.Specialized。 HybridDictionary



来自 ICollection 的其他收藏品是:



系统。收藏。 BitArray



System.Collections。 Stack

System.Collections。 队列

System.Collections.Specialized。 NameValueCollection

然后是System.Collections.Specialized。 StringDictionary 只实现了IEnumerable,还有System.Collections.Specialized。 BitVector32 是bit / Boolean的集合。



干杯,

Edo
Hello Sencsk,

Each collection (or generic collection, concurrent collection etc) has it''s own purposes, strengths and weaknesses.

Without specifications on your needs, I''d be offering from dictionary to array.
If you just want a survey on collections, here''s a try:

IList interface is for collections of values. Here is the list of collections that implement it:

System.Array
System.Collections.ArrayList
System.Collections.Specialized.StringCollection

The interface IDictionary is for collections of (Key, Value) pairs. Here is the list of collections that implement it:

System.Collections.Hashtable
System.Collections.Specialized.ListDictionary
System.Collections.SortedList
System.Collections.Specialized.HybridDictionary

Other collections derived from ICollection are:

System.Collections.BitArray

System.Collections.Stack
System.Collections.Queue
System.Collections.Specialized.NameValueCollection
Then there is System.Collections.Specialized.StringDictionary that implements just IEnumerable and there is also System.Collections.Specialized.BitVector32 tha''s a collection of bit/Boolean.

Cheers,
Edo


这篇关于C#.net从表中收集数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆