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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:43:46+00:00 2026-05-30T04:43:46+00:00

I have the following code returning the error ‘object’ does not contain a constructor

  • 0

I have the following code returning the error ” ‘object’ does not contain a constructor that takes x arguments.” on the line trying to call the base constructor.

Solution 1, project 1

namespace Project.Sub.A
{
  internal class Foo
  {
    internal Foo(int a, long b) {}

  }
}

Solution 1,project 2

namespace Project.Sub.B{
  internal class Bar : Foo
  {
    internal Bar(int a, long b,long c) :base(a,b+c) {}

  }
}

I have NO idea why this does not want to work. Could be my namespaces configured incorrectly?

  • 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-30T04:43:47+00:00Added an answer on May 30, 2026 at 4:43 am

    internal access is per assembly, not namespace.

    Because the constructor in the base class is declared internal, it is not accessible to the subclass in the other project. Try changing it to protected internal, or just protected.

    update

    Just noticed that the base class is also internal. You will need to make it public if you want it to be seen in the second project. Or, you can add [assembly:InternalsVisibleTo("Project2")] in AssemblyInfo.cs in Project1. (I wouldn’t personally recommend this option, though.)

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

Sidebar

Related Questions

I have the following Hibernate code that is returning an error. The results of
I have the following Spring code, taken from a textbook, that's returning a NotWritablePropertyException.
I have the following code (calling a method returning IEnumerable): FibonacciWithLinq.Skip(delegate() { return 5;
I have the following code but the lon/lat seems to be returning null; package
I have added the following block of code to my WP7 app and not
I have the following code that applies a XSLT style Test.Xml.xslTransform = function(xml, xsl)
I have the the following code in a script that I am learning from
I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public
I have following Code Block Which I tried to optimize in the Optimized section
I have following code in my application: // to set tip - photo in

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.