{
static void Main(string[] args)
{
List
Names.Add("saurabh");
Names.Add("somu");
Names.Add("vivek");
foreach (string item in GetNames(Names))
{
Console.WriteLine(item);
}
}
public static IEnumerable
{
for (int i = 0; i < Names.Count; i++)
{
yield return Names[i];
}
}
}
0 comments:
Post a Comment