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.