Thread vs Task
Output:
3
4
5
6
//========================================================================
IEnumerable, ICollection, IQueryable
In C#, a concurrent collection is a thread-safe data structure from the namespace that allows multiple threads to add, remove, or update items simultaneously without requiring manual synchronization. These collections are designed to prevent race conditions and improve scalability in multi-threaded applications.
In C# 10 & above, Struct can have parameterless constructor