LINQ -able objects?

R

Raj

string myname="Raj";
int myage=35;

Both the variables are made of collections characters.
Which one is the ideal candidate for LINQ query-able object?
How to check whether a particular object is LINQ query-able at runtime? Does
it need to implement any interface implicitly or explicitly??

Thank you

Regards
Raj
 
H

Harlan Messinger

Raj said:
string myname="Raj";
int myage=35;

Both the variables are made of collections characters.

The second one isn't. The 35 is how it's represented in the code and
displayed, but in memory there is no 3 and no 5, there's just the
integer 35.
Which one is the ideal candidate for LINQ query-able object?
How to check whether a particular object is LINQ query-able at runtime? Does
it need to implement any interface implicitly or explicitly??

IEnumerable<T>. I think any basic instruction on LINQ will talk about this.
 
M

Mr. Arnold

Raj said:
string myname="Raj";
int myage=35;

Both the variables are made of collections characters.
Which one is the ideal candidate for LINQ query-able object?
How to check whether a particular object is LINQ query-able at runtime? Does
it need to implement any interface implicitly or explicitly??

Anything implementing IList, IQueryable and IEnumerable are interfaces
that can be queried by Linq-2-Object.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top