工作要继承通用类,使用这个目的,我写的波纹管语法如何继承在C#。我泛型类
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";
}
}
我想Ansestors.Father.FatherName =“XXX”;财产。什么对我的语法问题?PLZ表现出一定的语法来解决这个issue.if有任何疑问PLZ ask.Thanks提前
祖先是正确的拼写 - 您可能要改变你坚持到拼写错误之前像我们用引荐。 – Dan
对不起............ – shamim
我不认为你有正确的泛型概念... – BoltClock