Well, this is for example creating comma-separated string of values:

                csv_list =
                    item_ids_list.Select(r => r.ToString()).Aggregate(
                        (current, next) => current + ',' + next);



On 5 December 2011 13:23, Peter Maddin <[email protected]> wrote:

> Ok Thanks very much****
>
> ** **
>
> So in this case, the parenthesis, can be removed.****
>
> Do you have a simple example where  two (or more parameters are used)?****
>
> ** **
>
> What I hate is when one is trying to learn this stuff, something is just
> presented without any explanation in the examples used.****
>
> ** **
>
> *Regards Peter Maddin*
> *Applications Development Officer*
> *Path**West Laboratory Medicine WA*
> *Phone : +618 6396 4285 (Monday, Wednesday,Friday)*
>
> *Phone : +618 9346 4372 (Tuesday, Thursday)**
> Mobile: 0423 540 825*
> *E-Mail : [email protected]; [email protected]*
> *The contents of this e-mail transmission outside of the WAGHS network
> are intended solely for the named recipient's), may be confidential, and
> may be privileged or otherwise protected from disclosure in the public
> interest. The use, reproduction, disclosure or distribution of the contents
> of this e-mail transmission by any person other than the named recipient(s)
> is prohibited. If you are not a named recipient please notify the sender
> immediately**.*****
>
>  ****
>
> ** **
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Jano Petras
> *Sent:* Monday, 5 December 2011 8:19 PM
> *To:* ozDotNet
> *Subject:* Re: Learning LINQ novice question****
>
> ** **
>
> Parenthesis are used if there is more than one parameter for lambda
> function. Not required for single-parameter lambdas.
>
> ****
>
> On 5 December 2011 13:17, Peter Maddin <[email protected]> wrote:**
> **
>
> Am learning linq.****
>
>  ****
>
> I noticed from the examples I using to learn, that I have this****
>
>  ****
>
>  var products = GetProducts()****
>
>         .Where((prod) => prod.CategoryID == 2);****
>
>  ****
>
> Why is prod placed inside parenthesis?****
>
>  ****
>
> Sometimes it is, sometimes its not.****
>
>  ****
>
>  var productsDictionary =****
>
>         products.ToDictionary(prod => prod.ProductID);****
>
>  ****
>
> I am finding this lack of consistency somewhat confusing.****
>
> ** **
>
> Probably the parenthesis can be eliminated, but why in the first example was 
> it used?****
>
> ** **
>
> Where is it necessary to use parenthesis and where is it not?****
>
> The use of parenthesis was introduced without any explanation. ****
>
>  ****
>
> Sorry for such a basic question.****
>
>  ****
>
> *Regards Peter Maddin*
> *Applications Development Officer*
> *Path**West Laboratory Medicine WA*
> *Phone : +618 6396 4285 (Monday, Wednesday,Friday)*****
>
> *Phone : +618 9346 4372 (Tuesday, Thursday)
> Mobile: 0423 540 825*
> *E-Mail : [email protected]; [email protected]*
> *The contents of this e-mail transmission outside of the WAGHS network
> are intended solely for the named recipient's), may be confidential, and
> may be privileged or otherwise protected from disclosure in the public
> interest. The use, reproduction, disclosure or distribution of the contents
> of this e-mail transmission by any person other than the named recipient(s)
> is prohibited. If you are not a named recipient please notify the sender
> immediately**.*****
>
>  ****
>
>  ****
>
> ** **
>

Reply via email to