Foreach loop to print element of string array

Sourav.Kayal
Posted by Sourav.Kayal under C# category on | Points: 40 | Views : 964
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