referencing a class through interface???
how referencing a class through interface???
Collapse
X
-
Tags: None
-
Hi,
Try this:
--------------------------------
Interface : IHuman
Classes : Man,Woman
public interface IHuman
{
public void SetAge(int age);
public void SetName(int name);
}
Class Man :
public class Man : IHuman
{
public override void SetAge(int age)
{
Console.WriteLi ne(age.ToString ());
}
public override void SetName(int name)
{
Console.WriteLi ne(name.ToStrin g());
}
}
----------------------------
Balaji U
Comment