c# - .NET: class definition explanation -


i understand basic inheritance , understand basics of generics.

but not understand class definition:

public class exportcontroller : abstractfeedcontroller<iexportfeed> 

the exportcontroller inherits abstractfeedcontroller...

but, <iexportfeed> do/mean? generics?

yes, generic definition. in short, abstractfeedcontroller defines generic implementation can applied various types including iexportfeed in case.

look @ definition of class abstractfeedcontroller, see

class abstractfeedcontroller<t>{ ... 

in class see type t used multiple times. whenever see t, can swap in mind type think can apply.

in class definition, might see where t : .... condition on type t, limiting kind of types class can use.

read this msdn article in-depth explanation.


Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -