Work on C# .I want to inherit generic class for this purpose i write the bellow syntax
public class Father
{
public string FatherName { get; set; }
}
public class Mother
{
public string MotherName { get; set; }
}
public class Ancestors<T, U>
{
//public class Bar
//{
// private T t;
// private U u;
//}
}
class Program : Ancestors<Father, Mother>
{
static void Main(string[] args)
{
Ansestors.Father.FatherName = "xxx";
}
}
I want Ansestors.Father.FatherName = "xxx"; property .What's problem on my syntax?Plz show some syntax to solve this issue.if have any query plz ask.Thanks in advance