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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:25:00+00:00 2026-05-11T07:25:00+00:00

I have a strange problem in my project. I have a class that inherits

  • 0

I have a strange problem in my project. I have a class that inherits from a base class (which again inherits from another base class) and overrides a function. However, when that function is called it never calls the overridden function, but the base function.

However, when I override that function in the middle class it is called. But this is confusing: let’s explain with a drawing 🙂

  • lib GuiShared

    • class bScreen
      • virtual function InitializeRoc
  • lib TigerControlRoot

    • class bTigerScreen
      • override function InitializeRoc <– when overriden here it gets called
  • lib TigerControlRootCommonScreens
    • class CheckInRules
      • override function InitializeRoc <– not called :s

The constructor gets called however…

Here’s my (simplified) code:

The shared base class

namespace Ppb.GuiShared.Screens {     public partial class bScreen<T> : Ppb.Controls.pPanel where T : FrameworkMiddleware.Framework.Remoting.Remotable, FrameworkMiddleware.IInitialize, new() {         public virtual void Load(bMain<T>.LoadEventArgs args) {             log.Trace('InitializeRoc ' + this.GetType().FullName);             InitializeRoc(args);             _hasLoaded = true;         }          protected virtual void InitializeRoc(bMain<T>.LoadEventArgs args) { }     } } 

project base class

namespace Tiger.ControlRoot.Screens {     public partial class bTigerScreen : Ppb.GuiShared.Screens.bScreen<roc.Tiger> {         public bTigerScreen(GuiSettings settings, roc.Tiger tiger)             : base(settings, tiger) {             InitializeComponent();             InitializeMenu();         }     } } 

The failing class (or any other class from that lib)

namespace Tiger.ControlRoot.CommonScreens {     [ControlRoot.Screens.TigerScreenInfo('Testje', Tiger.ControlRoot.Screens.TigerScreenInfoAttribute.elevel.User, true)]     public class CheckInRules : ControlRoot.Screens.bTigerScreen {          public CheckInRules(GuiSettings settings, roc.Tiger tiger)             : base(settings, tiger) {          }          protected override void InitializeRoc(Ppb.GuiShared.bMain<TigerMiddleware.TigerRoc.Tiger>.LoadEventArgs args) {             base.InitializeRoc(args);         }     } } 

And if that wasn’t enough, when I try to call some function on the base class I receive a TypeLoadException.

GenericArguments[0], 'TigerMiddleware.TigerRoc.Tiger', on 'Ppb.GuiShared.bMain`1+LoadEventArgs[T]' violates the constraint of type parameter 'T'.

Similar code with the same GuiShared lib is used in another project and there there are no issues.

  • 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. 2026-05-11T07:25:01+00:00Added an answer on May 11, 2026 at 7:25 am

    Okay, thanks for all (the) response(s), but I fixed it in the meantime.

    The problem was the following: The failing class is in an dll from which its output path in debug mode is set to the executable’s plugin folder. No problem so far, but it also copies its dependencies into that folder.
    However, some of the dependencies are already copied to the executable’s root folder. The executable when it startups searches all the plugins in the plugin folder and when required instantiates the plugin.
    The problem then is that the plugin uses the dependencies from in the plugins folder while the executable uses the dependencies from the root folder which are basically the same file in a different dir, so while running the clr sees them as 2 different dll’s and that really confuses the clr :).

    So when the shared dependencies aren’t copied to the plugins folder, everything runs fine because the plugins use the depedencies from the root folder and thus the same dll’s.

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

Sidebar

Ask A Question

Stats

  • Questions 72k
  • Answers 72k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer text-align aligns text and other inline content. It doesn't align… May 11, 2026 at 1:45 pm
  • added an answer The membership providers are really nice, and you can definitely… May 11, 2026 at 1:45 pm
  • added an answer You'll need to use Win32 APIs. Here's what you could… May 11, 2026 at 1:45 pm

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.