令我惊讶的是我能够做到这一点:
public abstract class BaseComponent
{
protected GameObject GameObject;
internal BaseComponent(GameObject gameObject)
{
GameObject = gameObject;
}
}
public abstract class BaseComponent<TComponent, TManager> : BaseComponent
where ...
{
}
- 为我的 2 个类(class)命名是否是相同的错误做法?
- 在这种情况下是否有标准的命名约定?
最佳答案
Is naming my 2 classes the same bad practice?
没有。
Is there a standard naming convention in this case?
同名即可。比照。 IEnumerable
和 IEnumerable<T>
.
To my surprise i'm able to do this:
为什么是惊喜?它很直观,并且是框架中的标准。
关于c# - 具有相同名称的非通用类和通用类的不良做法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8139563/