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

LVL 4
g_johnsonAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
g_johnsonConnect With a Mentor Author Commented:
Actually what I found out by testing was that it returns an empty collection, i.e., x.Count() = 0.

Thanks for taking a look
0
 
g_johnsonAuthor Commented:
This turns out to be the correct answer.
0
 
g_johnsonAuthor Commented:
Testing proves out that x is not null when the statement is executed.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.