Sort in Rotation Scripts
CODE:
Please log in to see this code.
I have googled the heck out of "this" attempting to understand what the appropriate translation would be in Visual Studio for "this".
Any help?
Vince
Size:
Color:
There's no "translation" for
this and no need to modify anything. Prooflink:
Strategies.ActiveTrader - Download Project Source Code (2010.06, final)See the
ATMMar2010 class.
Your question would be OK if it had the compiler error message you're getting. Be careful even when you do a copy/paste. Sounds like a bad copy/paste where you've omitted one of the interface's declaration (and maybe auxiliary
Holder class as well):
CODE:
Please log in to see this code.
Size:
Color:
BINGO!
You nailed it. Bad copy/paste.
Thanks!
Vince
Size:
Color:
In this case, "this" means "this instance" of the ATMMar2010 class object. The
.Sort property takes an IComparer object, which can be
different from the default IComparer object you declared for the class as shown in Post #2. This allows you to create, for example, an ascending sort for the default (as shown in Post #2), then override that default with another IComparer object, say a descending sort, as a parameter on
.Sort(...).
The lines
CODE:
Please log in to see this code.
mean exactly the same thing. You're telling the
.Sort property to use the default IComparer object that your declared for the ATMMar2010 class in Post #2. In this case, that's declared as
IComparer<iHolder>
Size:
Color:
Thanks superticker! I THINK I am starting to get "this". :)
Vince
Size:
Color: