Logo

Programming-Idioms

History of Idiom 117 > diff from v46 to v47

Edit summary for version 47 by silver-dragon:
[VB] Updated documentation URL

Version 46

2019-09-30, 14:22:16

Version 47

2019-09-30, 14:23:14

Idiom #117 Get list size

Set n to the number of elements of list x.

Illustration

Idiom #117 Get list size

Set n to the number of elements of list x.

Illustration
Extra Keywords
length
Extra Keywords
length
Code
Dim ItemList As New List(Of String)(New String() {"one", "two", "three"})
Console.WriteLine(ItemList.Count)
Code
Dim ItemList As New List(Of String)(New String() {"one", "two", "three"})
Console.WriteLine(ItemList.Count)
Doc URL
https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1?redirectedfrom=MSDN&view=netframework-4.8
Doc URL
https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1.count?view=netframework-4.8#System_Collections_Generic_List_1_Count