Which of the following arrays will be returned as result when you run the following LINQ query in .Net framework 4.0? object[] varnumbers = { null, 1.0, "two", 3, "four", 5, "six", 7.0 }; var doubles = varnumbers.OfType<double>(); foreach (var d in doubles) { Response.Write(d); }

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
Which of the following arrays will be returned as result when you run the following LINQ query in .Net framework 4.0?

object[] varnumbers = { null, 1.0, "two", 3, "four", 5, "six", 7.0 };

var doubles = varnumbers.OfType<double>();

foreach (var d in doubles)
{
    Response.Write(d);
}

1.1, 7

2.null

3.two, four, six

4.null, 1.0, "two", 3, "four", 5, "six", 7.0

Posted Date:-2022-08-16 04:38:25


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!