• When we add elements to a List, the class allocates enough memory to store them on its own. Shows a list Shows a reverse list.
  • std::list is the class of the List container. It is the part of C++ Standard Template Library (STL) and is defined inside <list> header file.
  • Yukarıdaki örnekte, List int asalSayilar= new List int (); Int türünde bir liste oluşturur. Aynı şekilde, şehirler ve büyükşehirler string tipi listelerdir.
  • To count the elements in a C# list, you can use the Count property provided by the List class. This property returns the total number of elements present in the list.
  • The C# List<T> class allows you to manage a list of values of any type. The List<T> class represents a strongly typed list of objects that can be accessed by index.
  • It offers various methods including ones for adding values to the list, removing values from it and retrieving a value from a specific place in the list.
  • std::list. std::list is a container that supports constant time insertion and removal of elements from anywhere in the container. Fast random access is not supported.
  • In c# generic list is a strongly typed object so it will store an elements of same data type and the size of list will vary dynamically.
  • List sınıfını kullanmak için öncelikle C# programında using System.Collections.Generic; ifadesini ekleyerek, List sınıfını kullanılabilir hale getirmemiz gerekmektedir.
  • List<T> is a dynamic collection that contains multiple objects of the same data type that can be accessed using an index.