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
Post a Comment