C# Language: generics, open/closed, bound/unbound, constructed

后端 未结 2 846
日久生厌
日久生厌 2020-12-02 08:44

I\'m reading book \"the C# programming Language\", 4th Edition, by Anders Hejlsberg etc.

There are several definitions that are a bit twisting:

unbo

2条回答
  •  庸人自扰
    2020-12-02 09:11

    An excellent answer is given by Jon, here.

    Not giving a technical description since everything is there perfectly in the linked answer. To merely replicate the gist of it as an answer here, it would look like:

    A                             //non generic, bound
    A                       //generic,     bound,  open,   constructed
    A                     //generic,     bound,  open,   constructed
    A                   //generic,     bound,  closed, constructed
    A<,> (used like typeof(A<,>)) //generic,     unbound 
    

    Edited after discussion with Heinzi.

提交回复
热议问题