Re-learning C # advanced programming (generics and arrays ),

Source: Internet
Author: User

Re-learning C # advanced programming (generics and arrays ),

I have been busy with my work some time ago, so I didn't write it casually. Now I want to continue.

I re-read the generic and array Chapters two days ago. Let me briefly explain my gains.

Generic

We know that arrays are a batch data format, while generics are actually a custom batch data format, when the array and C # existing generic class List and Dictionary <K, V> do not meet our requirements, we can create a generic class by ourselves, I will not explain how to create a function here. I need to find a solution when creating the function. (I personally feel that there is no need to figure out how to implement each function, if you really want to use it, you can find a lot of implementation methods on the Internet. As long as you know that there is such a solution, you can implement such a function ).

Generic classes are strongly typed, which means that when you create a generic object, the types of objects that can be stored in this series are limited.

Array

An array is used when data needs to be processed in batches. The role of arrays in the program is similar to that of basic data types. Arrays include two-dimensional arrays and multi-dimensional arrays. Usually, there are many two-dimensional arrays. Specify the length of the array when creating an array. If the length of the array is not specified, the values of each node in the array must be specified at the time of creation. when running the program, the length of the array can be reversed based on the number of specified nodes.

 

Related Article

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.