C # Collection types

Source: Internet
Author: User

The job interview has encountered a problem:

Lists the collection types in C # ___;

Enumerates the concurrent collection types in C #;

I know not deep, find the answer, I hope you correct:

Collection types are common variants of data collections, such as hash tables, queues, stacks, dictionaries, and lists. The collection is based on the ICollection interface, the IList interface, the IDictionary interface, or the corresponding interface in its generic collection.

1. Array collection type: Describes an array function that allows an array to be treated as a collection.

2.ArrayList and List collection types: Describes the functionality of generic and non-generic lists (the most common collection types).

3.Hashtable and Dictionary collection types: Describes the functions of hash-based generics and non-generic dictionary types.

4.SortedList and SortedDictionary collection types: A dictionary that describes sorting and a mixed type of combination dictionaries and list features.

5. Queues Queue Collection type: Describes the functionality of generics and non-generic queues.

6. Stack Stack collection type: Describes the functionality of generics and non-generic stacks.

7.HashSet collection type: Describes the generic HashSet (T) collection type.

8.HashSet and LINQ Set operations: Describes set operations provided by the HashSet (T) collection type and LINQ set operations.

Concurrent collection types make multithreaded operations more secure, relative to the addition of lock locks to non-concurrent collections.

Several classes under the System.Collections.Concurrent

    • Concurrentqueue
    • Concurrentstack
    • Concurrentbag: An unordered set of data structures that is useful when you don't need to consider order.
    • BlockingCollection: Similar to the classic blocking queue data structure
    • Concurrentdictionary
    • Iproducerconsumer<t> and Blockingcollection<t>

C # Collection types

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.