check length of list c# code example
Example 1: c sharp list length
List<string> stringList = new List<string>{"string1", "string2"};
stringList.Count
Example 2: c# list length
using System;
using System.Collections.Generic;
List<int> list = new List<int>() {7,5,1,4 };
int listLenght = list.Count;
Console.WriteLine(listLenght);
Example 3: get list length c#
public List<int> values;
public int listLength;
listLength = values.Count;
Example 4: how to find length of list c#
list.Count
Example 5: c# how to get length of string list
list.Length