Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP inlist() in c#
Message
De
02/10/2008 10:17:32
 
 
À
02/10/2008 08:25:34
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01320903
Message ID:
01352265
Vues:
57
>>>>>>Cool.
>>>>>>I can't actually remember what we were trying to do but I like the way you did it !
>>>>>>
>>>>>>But I guess that since extension methods are, under the hood, built as regular methods then generics should work in the same way.
>>>>>>
>>>>>>Best,
>>>>>>Viv.
>>>>>__
>>>>>
>>>>>Yeah, it's a long time ago. When I read about them I felt so excited I had to post it ;-)
>>>>
>>>>Also worth remembering that you can apply extension methods to Interfaces as well.
>>>>Regards,
>>>>Viv
>>>_________
>>>
>>>Yes, - I saw an example of that - need time to digest that
>>>(Accelerated C# 2008 - apress - pages 415 +)
>>>
>>>I have not compiled this - just typed it
>>>
>>>ps: LessThan, GreaterThan signs replaced by { and } - Michel is eating them
>>>
>>>public static class MyExtensions
>>>{
>>>    public static IEnumerable {R} Transform{T, R}(this IEnumerable{T} input, Func{T, R} op)
>>>    {
>>>        foreach( var item in input)
>>>        {
>>>            yield return op (item) ;
>>>        }
>>>    }
>>>}
>>>
>>>
>>>cheers,
>>
>>A generic interface using extension methods - I'll need time to digest that too !
>>
>>BTW, would you recommend the book?
>>I've got 'C#2008 and the .NET 3.5 Platform' and 'Pro WPF in C#2008' from Apress and like both of them.....
>
>
>I've got 'C#2008 and the .NET 3.5 Platform' too - just begun reading it in bits
>
>Yes, I would recommend 'Accelerated C# 2008 - Trey Nash'
>I've gotten as far as page 111 - jumped to page 415+
>
>You may want to skip the first 50 pages though
>
>Even if you don't learn a lot of new stuff - it refreshes the memory
>
>Have a look at the toc http://www.amazon.com/gp/reader/1590598733/ref=sib_dp_ptu#reader-link
>
>
>update: having bought the book you can download a pdf version as well

Hi,

Hmmm. From the TOC there doesn't seem to be much there that's not covered in the Pro C# book but...

I'm waiting for this one to arrive:
http://www.amazon.co.uk/WPF-Recipes-2008-Problem-Solution-Problem-solution/dp/1430210842/ref=sr_1_1?ie=UTF8&s=books&qid=1222956385&sr=8-1

Like you (from what you said in another thread) I'm looking at how best to use all the various bits of WPF in a coherent application design so I'm sort of hoping this book will help.....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform