IComparer
Author: iwally
Creation Date: 7/14/2012 2:51 PM
profile picture

iwally

#1
OK first - please have mercy - I'm new at c# as well as wealthlab but willing to look things up and
.. (along with reading C# tutorials) I've started by trying to understand a sample program RSIRotation.

in RSIRotation there exists a line ..
CODE:
Please log in to see this code.


which I take to be a declaration of a class derived from "Wealthscript, IComparer"

Trying to understand IComparer, I find no/little information through searching the wiki and forums the programming guide or elsewhere.

So am I being dense/interpreting this incorrectly? Is IComparer being declared as and where I see it in the program? Or perhaps there is some (other) library of Wealthlab classes and methods I need to review?? I'm missing something here.


thanks
profile picture

Eugene

#2
This is an interface built in .NET framework for customizing the sort order of a collection (like List, for example). Like with many other C# constructs and terms, you can look IComparer up on Microsoft's MSDN or Google.
profile picture

iwally

#3
Thanks Eugene, somehow I was looking at the wrong end of the MS-elephant and forgot about msdn altogether - it's been awhile.
profile picture

Eugene

#4
Here's a pretty simple tutorial written for C# 2.0:

Sorting Lists using IComparable and IComparer Interface in .NET

Hope that helps.
profile picture

iwally

#5
Super! Thanks again!
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).