Learn C # while playing Unity - Part 8. Lists in C #. Arrays are not needed? List type (T) + Unity

Опубликовано: 12 Апрель 2026
на канале: RAYBEL CREATION
1,743
88

✅ So the 8th part of the series “Learn C # playing in Unity” was born. I am glad that there is a demand for this course, so I continue. In the last part, we parsed the arrays, and today I decided to parse the lists. Since they are used for roughly the same tasks as arrays. In my practice of creating programs in C #, I didn’t seem to use lists, I don’t remember exactly, since I’ve been doing this for a long time. But in Unity I use it almost all the time.

⚡️ Task!
The task is as follows: create two lists and 1 array of 6 int elements. The array contains random numbers from 0 to the number of my subscribers at the time of watching this video. Your task is in two stages: first you need to fill the first list with values ​​from the array. The second stage is to fill the second list with three random values ​​from the array. In addition, try sorting the lists and displaying the result to the console. And after removing 1 element from each list, it is desirable to remove the last one (the Count property helps).

⚠️ Link for HW:
https://drive.google.com/drive/folder...

📝 Time codes:
00:00 Introduction
00:38 Intro
00:48 What is List (T)?
01:30 Difference between Array and List (T)
02:00 List (T) operations, methods and properties
03:20 Example of using List (T)
05:12 Checking the work of the code
05:45 Summary of the example
06:20 Homemade
07:30 End


🤔 For communication:
Twich:   / raybelgames  
Telegram: @raybelgames
VK: https://www.vk.com/raybelgames
E-mail: [email protected]
YouTube: Raybel - Synergy CG

😇 Support:
Patreon:   / raybel  
VK: https://www.vk.com/raybelgames
DonationAlerts: https://www.donationalerts.com/r/rayb...

#Unity #CSharp #Programming