You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
In my opinion, it's not all that bad. There are not so many basic core interfaces in C#, in my opinion (I'm not a C# expert), that their methods cannot be reduced to one basic superclass and then inherited by whoever needs what
What do you mean by "inherit what you need"? Inherit not the whole class but a part of it? ) I'm not familiar with such functionality.
No, I meant define many virtual functions and overload them in inheritors as needed.
No, I meant define many virtual functions and overload them in inheritors as needed.
It's total chaos and uncontrollability. Interfaces define abstract methods that must be implemented, not "by necessity". This ensures implementation of these methods at the object. And with your approach if you forget to overload a method somewhere, the program will compile as if nothing had happened but the program will be called instead of the needed method.
Not a blank, but a "not implemented" exception. In C#, it's all over the place.
... If you forget to overload a method somewhere, the program will compile as if nothing had happened, but instead of the required method a blank one will be called. That's normal...
That's how it works in MQL, by the way ;(.
Not a blank, but a "not implemented" exception. In C# too, it seems to be all over the place.
That's how it works in MQL, by the way ;(
Not the point, you propose to catch bugs at runtime, while these bugs can (and should) be caught at compile time.
I think it's better than building structures like template <,,,,,,,> for classes. It will break your brain before you finish building such a "class system".
I think it's better than building structures like template <,,,,,,,> for classes. It will break your brain before you finish building such a "class system".
I'd rather rack my brains with the compiler, but I'll be sure that my program is guaranteed to work correctly and a working method is called, not something crazy.
If the whole thing has a simple base class, which mostly appears everywhere, and then the dynamic casts go, it might work).