Answers for "accessing the first item in a list c#"

C#
2

c# first item i list

var first_item = list.First();
Posted by: Guest on October-01-2020
0

csharp get first element of list

using System;

using System.Linq;

 

namespace LINQExamples

{

class Program

{

static void Main(string[] args)

{

int[] objList = { 1, 2, 3, 4, 5 };

int result = objList.First();

Console.WriteLine("Element from the List: {0}", result);

Console.ReadLine();

}

}

}
Posted by: Guest on October-04-2021

Code answers related to "accessing the first item in a list c#"

C# Answers by Framework

Browse Popular Code Answers by Language