Thanks for the snippets DaveyM69 - I've ended up with something similar. For now, to compare I'm using GetIndex(), but my converted code is constantly growing. Didn't know that CS is so much more complicated... Thanks again...
V
VendorX
@VendorX
Posts
-
Problem with override the operators -
Problem with override the operatorsOK, thanks guys for the links, but I've already seen this. Problem is that I'm trying to convert simple class from C++ to CS. Here is the code:
class SOME_API SomeClass
{
public:
// Accessors.
bool operator==( const SomeClass& Other ) const
{
return Index == Other.Index;
}bool operator!=( const SomeClass& Other ) const { return Index != Other.Index; } //...
private:
// SomeClass index.
int Index;//...
};
Is there any chance to convert this to CS without writing a bunch of code?
-
Problem with override the operators...and..? On MSDN they are overloadable...
-
Problem with override the operatorsI'm trying to override those operators:
==, !=, <, >, <=, >=, <<, >>
...but VS10 give me this error:
Overloadable unary operator expected
Is there some special conditions to make this work..? Cause those operators are overloadable...