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 8319613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:22:48+00:00 2026-06-08T22:22:48+00:00

ow to indicate that T is inherited from other class that implements certain methods:

  • 0

ow to indicate that T is inherited from other class that implements certain methods:

public Class A
 {
    public string GetAccessPoint();
    public string GetPriorityMap();
 }

public Class IndexBuilder<T> where T : A
{
   List<string> Go<T>(T obj)
   {
      string aPt=obj.GetAccessPoint();
      string pMap=obj.GetPriorityMap();
   }
}

In other words, I cannot access GetAccessPoint and GetPriority map of the obj although I indicated that it is inherited from A.

  • 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-08T22:22:50+00:00Added an answer on June 8, 2026 at 10:22 pm

    That’s because you redefined what T is when you made the Go method generic. Since T is defined at the class level, there is no need to redefine it in Go. Try this:

    public Class IndexBuilder<T> where T : A
    {
       List<string> Go(T obj)
       {
          string aPt=obj.GetAccessPoint();
          string pMap=obj.GetPriorityMap();
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Silverlight I noticed that the code-behind Page class inherits from UserControl: public partial
In my app, I have a class that inherits from AsyncTask and which downloads
Initial tests indicate that GDI+ (writing in VB.NET) is not fast enough for my
What I've read seems to indicate that the only way to do it is
I want to update a table to indicate that some rows are parents of
I can't figure how to indicate that a column is a foreign key in
I'm getting errors and warnings that seem to indicate that 4th edition examples are
The language shootout benchmarks at http://benchmarksgame.alioth.debian.org/ indicate that FPC programs use about 1/50th of
Edit: Appended or LDAP to question title to indicate that I would be fine
The documentation for write() says: Returns false to indicate that the kernel buffer is

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.