Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# count specific element in list

// lstSlots = new List<int> { 1, 1, 0 }
lstSlots.Count(n => n == 1)	// returns 2
 
PREVIOUS NEXT
Tagged: #count #specific #element #list
ADD COMMENT
Topic
Name
4+3 =