35 Replies
look at what the error says?
'Circle' does not implement interface member 'IShape_C.circumference()' [hw6]csharp(CS0535)
why it cant
because it doesn't
there is no
circumference
method in Circle
how to make it dose
circumference?
add a method called
circumference
to Circle
but it must be done with constuctor
that the teacher request
you already have a constructor
that one is fine
ok ok guid me
so i will add method
you need a method called
circumference
in Circle
ok ok wait
already
already what?
ohhhhh
i don't see a method called
circumference
i see isee
wrong type lol
work amazing
thanks a lot
❤️
👍
btw any idea why cant use double inheritance with abstract
got me confused
what do you mean?
or maybe can lol
so there is abstract and interface
mhm
in abstract cant use double inheritance
can i know why
Ero#1111
REPL Result: Success
Compile: 379.450ms | Execution: 30.491ms | React with ❌ to remove this embed.
you can
but for class I1 and I2 u still using interface
oh, yeah you can't inherit from 2 classes at once
abstract I1 { }
abstract I2 { }
abstract class C : I1, I2 { }
can be like that
only 1 class and/or multiple interfaces
may i know why
or no reason
just like that
there's good reasons for that
but i don't know enough to explain it well
ahh ok ok
advance here i come lol
thanks a lot for everything
🙏
Multiple inheritance caused many problem in the past
So it was decided to move on interfaces and eliminate multiple inheritance in c#
You have to always remember if there is no conflict caused by having similar member in your parent classes
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.