Foreach loop to print element of string array

Sourav.Kayal
Posted by Sourav.Kayal under C# category on | Points: 40 | Views : 1634
using System;
using System.Data.SqlClient;
namespace Test1
{
class Program
{
static void Main(string[] args)
{

string[] name = { "Sourav", "Kayal", "Ram", "Shyam" };
foreach(var n in name)
{
Console.WriteLine(n);
}
Console.ReadLine();
}
}
}

Comments or Responses

Login to post response