How to provide the different implementations to two abstract classes methods and methods name are same
Example
abstract class abstA
{
public abstract void get(int num);
}
abstract class abstB
{
public abstract void get();
}
How to use the get() method of two abstract classes
Two abstract classes with same method name
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Blocked AccountRank #403 · 6.2K reputationPosted Sep 25, 2008, 11:19 PM EDT
Hi Manoj
U can do this by using this code
class Testing
{
public abstract class abstA
{
public abstract void get(int num) ;
}
public abstract class abstB
{
public abstract void get();
}
public class Use1 : abstA
{
public override void get(int num)
{
//must do some work here
}
}
public class Use2 : abstB
{
public override void get()
{
//must do some work here
}
}
static void Main()
{
Use1 use1 = new Use1 ();
Use1 use2 = new Use2 ();
use1.get(int x);
use2.get();
}
}
Happy Coding!!