// Hmm...what type is subset?
Console.WriteLine("subset is a: {0}", subset.GetType().Name);
Console.WriteLine("subset is defined in: {0}", subset.GetType().Namespace);
}
I’ll let the interested reader verify the type-of-type of subset by executing the preceding code
(and it is not an array of integers!). In any case, it should be clear that implicit typing does have its
place within the LINQ technology set. In fact, it could be argued that the
only time one would make
use of the var keyword is when defining data returned from a LINQ query.
Do'stlaringiz bilan baham: |