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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:50:20+00:00 2026-05-28T01:50:20+00:00

This all got a little trickier than I had intended. I’m using the HistoricalReportWrapper

  • 0

This all got a little trickier than I had intended. I’m using the HistoricalReportWrapper class because I retrieve my data through an API which has made it not realistic to have HistoricalReport implement IReport directly.

public abstract class CormantChart : Chart
{
    public abstract IReport Report { get; protected set; }
}

public abstract class HistoricalChart : CormantChart
{
     public override HistoricalReportWrapper Report { get; protected set; }

     public HistoricalChart(HistoricalChartData chartData) : base(chartData)
     {
         Report = GetHistoricalReport(chartData.ReportID);
     }

     protected HistoricalReportWrapper GetHistoricalReport(int reportID)
     {
         return SessionRepository.Instance.HistoricalReports.Find(historicalReport => int.Equals(historicalReport.ID, reportID));
     }
}

public class HistoricalReportWrapper : IReport
{
    public HistoricalReport inner;

    public int ID
    {
        get { return inner.ID; }
        set { inner.ID = value; }
    }
    public string Name
    {
        get { return inner.Name; }
        set { inner.Name = value; }
    }

    public HistoricalReportWrapper(HistoricalReport obj)
    {
        inner = obj;
    }
}

public interface IReport
{
    string Name { get; set; }
    int ID { get; set; }
}

The idea here is that when I am working inside of the HistoricalChart class I need to be able to access specific properties of the HistoricalReport. The rest of my program, however, only needs to have access to the HistoricalReport’s ID and Name. As such, I would like to expose IReport’s properties to the world, but then keep the details contained to the class.

As it stands, all the classes which inherit HistoricalChart generate a “does not implement inherited abstract member” as well as a warning on HistoricalChart indicating that I am hiding CormantChart’s Report.

What’s the proper way to declare this to achieve what I’d like?

Thanks

EDIT: Whoops, I missed an override. Now, when I try to override CormantChart Report I receive:

'CableSolve.Web.Dashboard.Charting.Historical_Charts.HistoricalChart.Report': type must be 'CableSolve.Web.Dashboard.IReport' to match overridden member 'CableSolve.Web.Dashboard.Charting.CormantChart.Report'    C

EDIT2: Taking a look at C#: Overriding return types might be what I need.

  • 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-28T01:50:20+00:00Added an answer on May 28, 2026 at 1:50 am

    Because

     public HistoricalReportWrapper Report { get; protected set; }
    

    is not an implementation of

     public abstract IReport Report { get; protected set; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've currently got all of this mess at the top of my ViewModels which
Morning y'all This is probably an easy one but I barely got any sleep
So I'm been pounding on this problem all day. I've got a LinqDataSource that
Anybody knows how to do this? I got all the information of the email
I got this url /search/renttype-all.place-all.type-all.bedrooms-all.0.0/ I want to get the text after the second
I've got a reasonably simple query (this time) that I need ALL the results
Hallo all. I got this piece of code: <div> <input id=id1 name=radioButton type=radio> <input
I've got a file filled with records like this: NCNSCF1124557200811UPPY19871230 The codes are all
This really puzzled for hours, I searched all over the internet, but got no
I got a little problem i need a sql query that gives all rows

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.