Link to home
Start Free TrialLog in
Avatar of g_johnson
g_johnsonFlag for United States of America

asked on

What does IQueryable with no records return to C# program

In the attached code, if there are no records, will "x" be null?  If not, what will it be?

Thanks.

var x = from i in dc.table where i.field == "xyz" select i;

Open in new window

Avatar of russellC
russellC
Flag of United States of America image

ASKER CERTIFIED SOLUTION
Avatar of g_johnson
g_johnson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of g_johnson

ASKER

This turns out to be the correct answer.
Testing proves out that x is not null when the statement is executed.