Choose Category
Printing the values from LIST in C#
- Forget Code
- C#
- Printing the values from LIST
Using foreach, we can print the vales of a List.
Output:
1
2
3
4
using System;
using System.Collections.Generic;
namespace forgetCode
{
class program
{
public static void Main[]
{
List list = new List[];
list.Add[1];
list.Add[2];
list.Add[3];
list.Add[4];
foreach [int i in list]
{
Console.WriteLine[i];
}
}
}
}
Output:
1
2
3
4
Tags for Printing the values from LIST in C#
- //forgetcode.com/CSharp/1187-Printing-the-values-from-LIST
- how to print lists c
- c sharp printing values in list
- understanding the vales of coding
- print values from list in c
- print list values c
- code to print the values in c