From the above snippet List<string> AuthorList= new List<string>(); is the particular syntax для створення списку типів strings. Як можна, ви можете створити будь-який аркуш з вашого запозиченого типу даних. У випадку, якщо ви хочете створити integer list, то simplly replace object type- string with object type- int.

За допомогою string.Join() method Join() метод свідчить про те, що елементи з роздільною здатністю separated in between – it can be used to print the list of strings. Console. WriteLine(string. Join(", ", months));

List<string> myList = new List<string>() { "one", "two", "three", }; Через це, ми прийшли до шести елементів над.