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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:36:47+00:00 2026-05-12T19:36:47+00:00

I tried upgrading an ASP.Net application from Visual Studio 2005 to 2008, and I

  • 0

I tried upgrading an ASP.Net application from Visual Studio 2005 to 2008, and I tried compiling just to verify that it would compile and I received this error.

Error   1   Inconsistent accessibility: property type 'Web.Properties.UITitleSettings' is less accessible than property 'Web.Ctrl.BasePanel.UISettings' \\projectLocation\Ctrl\BasePanel.cs 25  43  ProjectName

(I removed the class path before Web.Properties and Web.Ctrl, it normally contains it)

The piece of code its referencing is

public Properties.UITitleSettings UISettings
    {
        get
        {
            return _uiSettings;
        }
    }

I’m not quite sure what this error is attempting to say. Does the type need to be casted (invalid implicit cast between two incompatible types?) or is it a class override issue?

  • 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-12T19:36:47+00:00Added an answer on May 12, 2026 at 7:36 pm

    Look at the following definition. Notice Foo is visible to anyone, and its public method GetBar is also visible to anyone who can see Foo:

    public class Foo 
    { 
        public Bar GetBar() { return new Bar(); } 
    }
    

    Here’s the definition of Bar:

    internal class Bar {}
    

    Notice Bar is internal to the assembly, whereas Foo is visible to all. Foo cannot expose Bar to the outside world, so the compiler throws this exception.

    Another example would be:

    public class Foo 
    { 
        public Foo.Bar GetBar() { return new Bar(); } 
        private class Bar {} 
    }
    

    Bar is a private class of Foo and can only be visible to instances of Foo. Foo cannot expose this type to the outside world, so the compiler throws the same exception.


    Examples of refactoring:

    1. Make the hidden type public

      public class Bar {}
      public class Foo { public class Bar {} }
      
    2. Encapsulation

      public class BarEncapsulator
      {
        private Bar _bar;
        internal BarEncapsulator(Bar myBar) { _bar = myBar; }
        public string BarString { get { return _bar.MyString; } }
      }
      
    3. Hide everything

      internal class Bar {}
      internal class Foo { public class Bar {} }
      
    4. Refactor it away

      public class BarEncapsulator
      {
        private string _barString;
        public string BarString { get { return _barString; } }
      }
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got a question with regards to upgrading asp.net mvc applications from v1
I have a asp.net application which is working from last 2-3 years, it has
I am upgrading a web app from ASP.NET 3 Preview 1 to the RTM
While upgrading a Windows Forms application from the .NET 1.1 framework to the .NET
Basically I am upgrading from 1.1 to .NET 3.5 SP1 and replacing an old
I'm creating an ASP.NET application which uses Facebook Connect and fbml tags. It also
I am working with an ASP.NET MVC project which was originally started from the
After upgrading from NServiceBus 2.0.0.1145 (.net 3.5) to version 2.0.0.1219 (.net 4.0), messages are
I'm working on an ASP.NET web application for our corporate intranet users. I have
We are upgrading our application from JBoss 4 to JBoss 6. A couple of

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.