LINQ -able objects?

  • Thread starter Thread starter Raj
  • Start date Start date
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
 
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.
 
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.
 
Back
Top