Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

length of list c#

using System;
using System.Collections.Generic;
using System.Linq;
 
public class Example
{
    public static void Main()
    {
        List<int> MainList = new List<int>{4, 6, 9, 44};

        int listLenght = MainList.Count;

        for (int d = 0; d < listLenght; d++) 
        {
            int Index1 = MainList.ElementAt(d);
            Console.WriteLine(Index1);
        }
    }
}
/*
output:
4
6
9
44
*/
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #length #list
ADD COMMENT
Topic
Name
8+8 =