C#异常继承语法w /泛型 [英] C# unusual inheritance syntax w/ generics

查看:160
本文介绍了C#异常继承语法w /泛型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发生在NHibernate类定义中:

I happened upon this in an NHibernate class definition:

public class SQLiteConfiguration : PersistenceConfiguration<SQLiteConfiguration>

所以这个类继承自派生类参数化的基类?   我的头只是爆炸了

So this class inherits from a base class that is parameterized by... the derived class?   My head just exploded.

有人可以解释这是什么意思,以及这种模式有用吗?

Can someone explain what this means and how this pattern is useful?

(这不是一个NHibernate-具体问题,顺便说一下。)

(This is NOT an NHibernate-specific question, by the way.)

推荐答案

这是一个有趣的奇怪的循环模板模式,不是吗?

这篇关于C#异常继承语法w /泛型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆