【发布时间】:2016-06-11 15:51:17
【问题描述】:
描述我的问题的最简单方法是使用示例代码。我知道这不会编译,但我需要一个类似的选项
abstract class Foo
{
protected abstract static ElementName {get;}
}
class Bar : Foo
{
protected static override ElementName
{
get
{
return "bar";
}
}
}
class Baz<T> where T : Foo
{
public string ElementName
{
get
{
return T.ElementName;
}
}
}
问候
【问题讨论】: