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

  • Home
  • SEARCH
  • 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 9182989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:41:32+00:00 2026-06-17T18:41:32+00:00

I have a schema of interfaces like the following (C# .NET4) interface A {

  • 0

I have a schema of interfaces like the following (C# .NET4)

interface A 
{

}

interface B 
{
    List<A> a;
}

interface C 
{
    List<B> b;
}

and I implemented it in this way:

public interface A 
{

}

public interface B<T> where T : A 
{
    List<T> a { get; set; }
}

public interface C<T> where T : B
{
    List<T> b { get; set; } // << ERROR: Using the generic type 'B<T>' requires 1 type arguments
}

I don’t know how to avoid the error Using the generic type ‘B’ requires 1 type arguments

  • 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-06-17T18:41:34+00:00Added an answer on June 17, 2026 at 6:41 pm

    Since interface B<T> is generic, you need to provide a formal type argument for it when declaring interface C<T>. In other words, the current problem is that you are not telling the compiler what type of interface B interface C “inherits” from.

    The two Ts will not necessarily refer to the same type. They can be the same type, as in

    public interface C<T> where T : B<T>, A { ... }
    

    or they can be two distinct types:

    public interface C<T, U> where T : B<U> where U : A { ... }
    

    The restrictions on the type argument are of course tighter in the first case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table which have schema like this id name 1 jack 2
I have a schema design that looks like this: Table: User Row Column Family
I have a schema like this <h1> 5/2009 <br/> Question: This is the question
I have the following endpoint interface: @WebService public interface SEIWebService { @WebMethod @WebResult(name=CreateWorkOrderItemResponse) CreateWorkOrderItemResponse
I have created a schema as an agreed upon interface between our company and
i have this schema: <div id=container> <div id=content>some text</div> <footer> my footer things </footer>
I have a schema called application. Is there a way that, rather than using
I have this schema: <xs:complexType name=foo> <xs:sequence> <xs:element name=oneBar type=xs:string minOccurs=0/> <xs:element name=twoBar type=xs:string
I have an existing XML schema that contains a type that I would like
I have a form model created as following: from plone.app.directives import Form class IFormSchema(form.Schema):

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.