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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:05:43+00:00 2026-06-18T04:05:43+00:00

When I run my C# app, it shows the following error Inconsistent accessibility: parameter

  • 0

When I run my C# app, it shows the following error

Inconsistent accessibility: parameter type ‘timesheet.libs.DbObject’ is less accessible than method ‘timesheet.model.usertimesheet.usertimesheet(timesheet.libs.DbObject)’ C:\Users\user\Desktop\Interface+code\Interface+code\timesheet\model\usertimesheet.cs

Inconsistent accessibility: parameter type ‘timesheet.libs.DbObject’ is less accessible than method ‘timesheet.MainFormMDI.setdbobject(timesheet.libs.DbObject)’ C:\Users\user\Desktop\Interface+code\Interface+code\timesheet\MainFormMDI.cs

Inconsistent accessibility: parameter type ‘timesheet.libs.DbObject’ is less accessible than method ‘timesheet.model.user.user(timesheet.libs.DbObject)’ C:\Users\user\Desktop\Interface+code\Interface+code\timesheet\model\user.cs

Inconsistent accessibility: parameter type ‘timesheet.libs.DbObject’ is less accessible than method ‘timesheet.model.project.project(timesheet.libs.DbObject)’ C:\Users\user\Desktop\Interface+code\Interface+code\timesheet\model\project.cs

I have a snippet of login.cs as

MainFormMDI mainform = new MainFormMDI();
mainform.setdbobject(dbobject);
mainform.setuserobject(userobj);
mainform.Show();

MainFormMDI.cs:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using timesheet.model;
using timesheet.libs;

namespace timesheet
{
    public partial class MainFormMDI : Form
    {
        private DbObject dbobject;
        private  user userobj;

        public MainFormMDI( )
        {
            InitializeComponent();
        }

        public void setdbobject(DbObject dbobject) 
        {
            this.dbobject = dbobject;
        }

        public void setuserobject(user userobj) 
        {
            this.userobj = userobj;
        }

        private void MainFormMDI_Load(object sender, EventArgs e)
        {
        }

        private void adminPanelToolStripMenuItem_Click(object sender, EventArgs e)
        {
        }
    }
}

I tried other solutions like changing the dbobject and user class to public but nothing changes. I want to pass the userobject and the dbobject to the MainFormMDI class to be able to carry out further actions on these objects. I will be happy to hear your fixes .

  • 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-18T04:05:44+00:00Added an answer on June 18, 2026 at 4:05 am

    You need to make timesheet.libs.DbObject public. You then need to recompile the library (making an assumption that libs indicates it’s in a library) and then rebuild the project that uses it.

    The problem is that DbObject is either private or internal and it’s being passed as a parameter to a public method. If the method is public, then all it parameter types must be as well.

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

Sidebar

Related Questions

I get the following error messages when I run the app: Description Resource Path
I'm recieving the following error code when trying to test run an app. Application
An app I manage suddenly (after a reboot) shows the following error; target of
when i run app in the IPhone simulater 5.1 the default image loads up
I'm testing my application as grails run-app. I have read How to remove app
I am trying to run our App on Mac Lion. App is built on
I'd like to run an app in the KIOSK mode, so that it auto-starts
is it possible to run java app on linux (with installed java and etc)
Just wondering if anybody has run Scala app or web-app on Java Real-Time system?
Having this errors when trying to compile/run my app using Maven. I've succeeded to

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.