Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stack has a reverse method - which does not seem to work
Message
De
26/07/2009 05:26:36
 
 
À
26/07/2009 05:17:08
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01407785
Message ID:
01414542
Vues:
22
>>>
>>>doh! I thought you meant that your extension method wasn't working.
>>
>>haha - would I post it if it weren't ?
>>
>>Something I was thinking about last night ... With this extension method, is there any possible 'conflict' ?
>>ie, when I use s.Reverse() it uses my extension method. To have it use the IEnumerable extension method I have to cast it, as in
>>
>>((IEnumerable<char>)s).Reverse();
>>
>>
>>My em changes the stack whilst the other doesn't.
>>
>>Just wondering whether there may be any troubles (side effects) ahead with LINQ are so ?
>>Since List(T) has a Reverse() that changes the list - I do not think so, ie LINQ works on the interface
>>
>>Maybe I should rename them to ReverseSequence() or so - just wondering
>
>My gut feeling (not always useful) is that there would NOT be a problem but It would still be better to use something like ReverseSequence() to avoid confusion ?

Well, we have the same gut feeling - better safe than sorry

thanks for the feedback
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform