how can we inherit generic interfaces in to a generic class? I have tried below code and getting error message: "Bc' does not implement interface member 'ConsoleApplication3.iB.showval(int, int)". How it could be solved?
interface iB<X, Y>
{
void storeval(X p1,Y p2);
void getval();
}
class Bc<X,Y>:iB<int,int>
{
private X _dm1;
private Y _dm2;
public void storeval(X p1,Y p2)
{
this._dm1 = p1;
this._dm2 = p2;
}
public void getval()
{
Console.WriteLine("{0}\t{1}",this._dm1,this._dm2);
}
}
class Program
{
static void Main(string[] args)
{
Bc<string, bool> b1 = new Bc<string, bool>();
b1.storeval("AppScienti",true);
b1.getval();
Console.ReadKey();
}
}