Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3844782
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:08:35+00:00 2026-05-19T16:08:35+00:00

.NET generics terminology is a bit ambiguous. Even worse – it seems to be

  • 0

.NET generics terminology is a bit ambiguous. Even worse – it seems to be used ambiguously and differently in different sources. What basically is not clear is relationships between these 4 terms (in relation to “Type”):

  1. open
  2. closed
  3. unbound
  4. constructed

I understand that List<T> is open and List<int> is closed. But what really is “constructed” and “unbound” in relation to open/closed types?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T16:08:36+00:00Added an answer on May 19, 2026 at 4:08 pm

    From the language specification:

    4.4 Constructed types

    A generic type declaration, by itself,
    denotes an unbound generic type that
    is used as a “blueprint” to form many
    different types, by way of applying
    type arguments. The type arguments are
    written within angle brackets (< and> )
    immediately following the name of the generic type. A type that includes
    at least one type argument is called a
    constructed type. A constructed type
    can be used in most places in the
    language in which a type name can
    appear. An unbound generic type can
    only be used within a
    typeof-expression (§7.6.11).
    […]

    4.4.2 Open and closed types

    All types can be classified as either
    open types or closed types. An open
    type is a type that involves type
    parameters. More specifically:

    • A
    type parameter defines an open type.

    • An array type is an open type if and
    only if its element type is an open
    type.

    • A constructed type is an open
    type if and only if one or more of its
    type arguments is an open type. A
    constructed nested type is an open
    type if and only if one or more of its
    type arguments or the type arguments
    of its containing type(s) is an open
    type.

    A closed type is a type that is
    not an open type.
    […]

    4.4.3 Bound and unbound types

    The term unbound type refers to a non-generic
    type or an unbound generic type. The
    term bound type refers to a
    non-generic type or a constructed
    type. An unbound type refers to the
    entity declared by a type declaration.
    An unbound generic type is not itself
    a type, and cannot be used as the type
    of a variable, argument or return
    value, or as a base type. The only
    construct in which an unbound generic
    type can be referenced is the typeof
    expression (§7.6.11).


    Here’s an example I thought of:

    // Foo<T> is an unbound generic type.
    class Foo<T> { .. } 
    
    // Bar<K> is an unbound generic type.
    // Its base-class Foo<K> is a constructed, open generic type.
    class Bar<K> : Foo<K> { .. } 
    
    // IntFoo is not a generic type.
    // Its base-class Foo<int> is a constructed, closed generic type.
    class IntFoo : Foo<int> { .. } 
    

    And here’s an attempt to tie that in with the reflection API, using the relevant properties: IsGenericType, IsGenericTypeDefinition and ContainsGenericParameters

    (These tests are not 100% predictive of each "kind" as per the language spec).

    +----------+---------------------+-----------+--------------+-------------------+
    |   Name   |        Kind         | IsGenType | IsGenTypeDef | ContainsGenParams |
    +----------+---------------------+-----------+--------------+-------------------+
    | Foo<>    | Unbound             | TRUE      | TRUE         | TRUE              |
    | Foo<>*   | Constructed, open   | TRUE      | FALSE        | TRUE              |
    | Foo<int> | Constructed, closed | TRUE      | FALSE        | FALSE             |
    | IntFoo   | Not generic         | FALSE     | FALSE        | FALSE             |
    +----------+---------------------+-----------+--------------+-------------------+
    * = Bar<>'s base type.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've never used any of the .NET generics in my work, but I understand
can ASP.NET controls be used with generics? Never seen this done and want a
LINQ is one of the greatest improvements to .NET since generics and it saves
In .NET, the Generics Lists have a sort function that accepts IComparer or Comparison
I know Java's generics are somewhat inferior to .Net's. I have a generic class
I'm building a generic ASP.NET server control that has an attribute used to specify
I have a question about .net generics. Consider the following code: public abstract class
Since .Net 4 does support generics in XAML , I'd like to create a
Is it possible to do the following with generics in C#.NET public abstract class
Can ML functors be practically expressed with .NET interfaces and generics? Is there an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.