jss3426
August 5th, 2008, 08:47 PM
anyone can point me as to how to one can pass an interface as a parameter? how i go about implementing the code below?
<code>
public class A
{
public void dome(IDo intface)
{
intface.callme();
}
public void Method()
{
MessageBox.Show("A");
}
}
public interface IDo
{
void callme();
}
class main
{
A instA = new A();
a.dome(//do i send it theimplementation? if not where is the implemenation implemented?
}
</code>
<code>
public class A
{
public void dome(IDo intface)
{
intface.callme();
}
public void Method()
{
MessageBox.Show("A");
}
}
public interface IDo
{
void callme();
}
class main
{
A instA = new A();
a.dome(//do i send it theimplementation? if not where is the implemenation implemented?
}
</code>