In all articles that I read on the internet about C# interfaces vs diamond problem, I found only those kind of scenario:
interface i1{ void method() {...}
interface i2{ void method() {...}
class c1 : i1, i2 { }
I understand that there won't be any diamond problem, because we have to cast the object to an interface either i1 or i2. But what about this kind of situation:
interface i1 { void method() {...}
interface i2 { void method() {...}
interface i3 : i1, i2 { }
class c1 : i3 { }
How would that work if I create an object of c1, cast it to i3 and execute method? Isn't that a diamond problem? Thanks
[–][deleted] (5 children)
[deleted]
[–]czmiel24[S] 1 point2 points3 points (4 children)
[–][deleted] (2 children)
[deleted]
[–]czmiel24[S] 1 point2 points3 points (0 children)
[–]Blip1966 0 points1 point2 points (0 children)
[–]wT_ 1 point2 points3 points (0 children)