Question : LINQ problem, get data from var

HI

How do I get the data form the a var variable to a string variable?

  var test = from o in myTable.AsEnumerable()
                     where o.Field<string>("C1") == "Test1"
                     && o.Field<string>("C2") == "Test2"
                     select o.Field<double>("Test3");

String test = var..........;

Answer : LINQ problem, get data from var

Do you expect one or more records back ?

var test = from o in myTable.AsEnumerable()
                     where o.Field<string>("C1") == "Test1"
                     && o.Field<string>("C2") == "Test2"
                     select o.Field<double>("Test3");

foreach (var Result in test )
            Console.WriteLine("Result: " + Result.ToString());
Random Solutions  
 
programming4us programming4us