Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stack has a reverse method - which does not seem to work
Message
From
26/07/2009 05:26:36
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01407785
Message ID:
01414542
Views:
23
>>>
>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform