How to get list length in C#

1 Answer

0 votes
using System;
using System.Collections.Generic;
   
class Program
{
    static void Main() {
        var list = new List<string> { "python", "c-sharp", "c", "c++", "java", "php", "go" };
   
        Console.WriteLine(list.Count);
    }
}
   
   
   
   
/*
run:
      
7
    
*/

 



answered Jul 6, 2023 by avibootz
...