inherit NativWindow and IDisposable
-
I have a class that inherits NativWindow, I would like the same class to also implement IDisposable. The problem is that C# wont let me inherit NativWindow and IDisposable (multiple inheratence). So, is it posible? Or is there some reason why I should not even be trying to do this? Thanks.
“If I had asked people what they wanted, they would have said faster horses.” ― Henry Ford
-
I have a class that inherits NativWindow, I would like the same class to also implement IDisposable. The problem is that C# wont let me inherit NativWindow and IDisposable (multiple inheratence). So, is it posible? Or is there some reason why I should not even be trying to do this? Thanks.
“If I had asked people what they wanted, they would have said faster horses.” ― Henry Ford
__John_ wrote:
The problem is that C# wont let me inherit NativWindow and IDisposable (multiple inheratence).
No, it doesn't. You're allowed to inherit from one base class, and you can implement multiple interfaces. If you wrapped your
IDisposable
in a class, then you should read up on creating acomposition
. Good luck.Bastard Programmer from Hell :suss:
-
__John_ wrote:
The problem is that C# wont let me inherit NativWindow and IDisposable (multiple inheratence).
No, it doesn't. You're allowed to inherit from one base class, and you can implement multiple interfaces. If you wrapped your
IDisposable
in a class, then you should read up on creating acomposition
. Good luck.Bastard Programmer from Hell :suss:
-
Thanks Eddy.
“If I had asked people what they wanted, they would have said faster horses.” ― Henry Ford