To Get string array data with IEnumerable using LINQ.

Posted by Jitendrasoft09 under C# category on | Points: 40 | Views : 1388
using System;
using System.Collections.Generic;
using System.Linq;

class JkLinq {

static void Main(string[] args) {

string[] jkvalue = new string[] { "Dell", "Sony", "samsung",

IEnumerable<string> mydata = from e in jkvalue
select e;

foreach (string str in mydata) {
Console.WriteLine("laptops are: {0}", str);


Comments or Responses

Login to post response