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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:22:03+00:00 2026-05-11T20:22:03+00:00

I need to inherit from a base class, one method of which has a

  • 0

I need to inherit from a base class, one method of which has a constructor with 8 arguments.

I won’t ever need all 8 arguments, I only need one. However, I do need to implement that method.

public MyClass : BaseClass
{    
    public class MyClass(string myArg):base(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
    {
         // do stuff
    }
}

results in an epic fail compiler message where args2-8 are hard-coded. Any hints?

Clarification: Arguments are all properties of the base class which are set via with this
initialization.

As the base class is a framework class, I’m not in a position to amend its properties or constructor.

Hopefully the final edit for those who want to know what the arguments are (and no, the opening brace is not an issue, thanks anyway) here’s the VB.NET code I’m trying to port as part of a Custom Membership Provider.

Sadly, finding an en example of C# membership provider was not possible.

Public Sub New(ByVal userName As String)
            MyBase.New("Shiningstar.SSSMembershipProvider", userName, _
            userName.GetHashCode, userName, "", "", False, False, Today, _
            Today, Today, Today, Today)

            Me.m_UserName = userName ' UserName() is read only
End Sub

The base class in this case is System.Web.Security.MembershipUser

  • 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-11T20:22:03+00:00Added an answer on May 11, 2026 at 8:22 pm

    Without the exact error message, I cannot be sure, but I suspect that your arg1 .. arg8 are instance fields of the class, which cannot be used before the base constructor.

    If you make them static fields, that problem would be solved.

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

Sidebar

Related Questions

So, I have a base class which has a private locking object like so:
I have a process which has a notify method which receives as a parameter
I'm trying to make Core Data objects inherit from my own custom class rather
I need to create a db structure where Supplier inherits from Client. I used
Need to an expression that returns only things with an I followed by either
I've seen at least one reliable source (a C++ class I took) recommend that
We're using SQLAlchemy declarative base and I have a method that I want isolate
Let's say I have an abstract base class that looks like this: class StellarObject(BaseModel):
If both ProductsController and CategoriesController both inherit from GenericController , what is a good
I need to solve the following question which i can't get to work by

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.