Team,
As I know that we can't create instance for Interface in .Net
But, I m bit confuse with some scenario's like,
Interface IA
{
add();
}
Class A : IA
{
add()
{
}
}
Now,I can use
IA obj = new A()
Can you please explain briefly & give some reference links to understand with core.
Thanks

SIVAPosted Mar 26, 2014, 6:21 AM
SIVAPosted Mar 26, 2014, 6:20 AM
VulpesPosted Mar 25, 2014, 1:06 PM
http://msdn.microsoft.com/en-us/library/ms173156.aspx
Ranjit PowarPosted Mar 25, 2014, 1:00 PM
interface I1
{
void add();
}
class Program:I1
{
public void add()
{
Console.Write("Hi");
}
static void Main(string[] args)
{
I1 i = new Program();
i.add();
}
}