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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:54:29+00:00 2026-06-01T11:54:29+00:00

First off, I’m sorry for asking such a simple question in such a sophisticated

  • 0

First off, I’m sorry for asking such a simple question in such a sophisticated place. I’m writing a one-off app to parse a text file. It’s a console app with the typical static Main().

I’ve declared another class like so. I’ve omitted the get/set because of the nature of the operation (it will be used once…never again).

public class Entry
{
    public List<string> numbers;
    public string rm;
    public string time;
    public string desc;

    Entry(List<string> n, string r, string t, string d)
    {
        numbers = n;
        rm = r;
        time = t;
        desc = d;
    }
}

When I try to instantiate the class in Main() with this statement:

Entry newEntry = new Entry(numbers, rn, time, desc);

I receive the error that Entry doesn’t have a constructor that takes 4 arguments. All of the variables being passed match the constructor definition types. I’m sleep-deprived and confused. What am I doing wrong?

Thanks, and sorry for the stupid question.

  • 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-01T11:54:30+00:00Added an answer on June 1, 2026 at 11:54 am

    You have made the constructor private. If you don’t use an access modifier for your constructor, it will be set as private by default. Put “public” in front of the constructor and it should work:

    public class Entry
    {
        public List<string> numbers;
        public string rm;
        public string time;
        public string desc;
    
        public Entry(List<string> n, string r, string t, string d)
        {
            numbers = n;
            rm = r;
            time = t;
            desc = d;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off, I'm working on an app that's written such that some of your
First off, let me apologize if I'm writing this in the wrong place. I
First off--thanks for having a look. MY QUESTION In a .NET web app, is
First off, this question is ripped out from this question. I did it because
First off, please accept my apologies if this question is basic, I mainly have
First off, I'm aware of the jQuery UI ThemeRoller - Installing themes question. However,
First off, don't link to the Don't parse HTML with Regex post :) I've
First off, my problem is quite similar to this one . I would like
First off, apologies if this is a complete noob question which could easily be
First off - apologies if this or a similar question has been asked before.

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.