class A : N
{
void sinefunc()
{
//some stuff here
}
}
class B : N
{
void sinefunc()
{
//some stuff here
}
}
class C : N
{
void sinefunc()
{
//some stuff here
}
}
The sinefunc() is a common function. but, the classes A,B and C exists in different
projects under a solution. The classes already inherit a common class N and now,
- To avoid code repetition, the
sinefunc()can be moved outside of these classes. - But, since Multiple inheritance is not allowed. what is the efficient method or
feasible way to make the function common ? (Please note that I don't want to put the
sinefunc()in class N. Its been already written and I don't want to disturb that class.