|
-
Feb 9th, 2010, 01:47 AM
#39
Re: How many"k" are in my textboxes
and actually linq is always faster ... except in cases where you need to evaluate the same thing multiple times... such as:
From xItem in asd where xItem.Somefunction() = "a" or xItem.Somefunction() = "b"
as Somefunction will be evaluated 2x where in a loop you could store this in a variable... of course u could do it like this:
From xItem In (From xItem In asd Select xItem, xItem.Somefunction) Where xItem.Somefunction = "a" Or xItem.Somefunction = "b" Select xItem.xItem
Thus only evaluating it in the inner linq query 1 time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|