© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
44 replies
Mass

✅ Inconsistent accessibility: property type is less accessible than property.

Hey!
I'm making a UWP app, but from my understanding this is universal to C#.
I have 2 different UWP Pages, that are both a
public sealed partial class
public sealed partial class
.
In one of them, namely MainPage, I have a list (ObservableCollection to be precise, but I've tried changing to a normal List and it gives the same error)
This is said list:
static ObservableCollection<CustomObject> MyList { get; } = new ObservableCollection<CustomObject>();
static ObservableCollection<CustomObject> MyList { get; } = new ObservableCollection<CustomObject>();


I want to access this in the second Page, let's just call it Page2. I try to call MainPage.MyList, but can't because of the lists protection level.
So I change the list to be
public
public
, and now I have an inconsistent accessibility.
I'm having a hard time understanding what the error means exactly, can someone clear things up for me? How am I supposed to access the property from Page2?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Error: Inconsistent accessibility: property type 'type' is less accessible than property 'property'
C#CC# / help
3y ago
Inconsistent accessibility: property type 'Exercises.Register.Gender' is less accessible than proper
C#CC# / help
3y ago
✅ Inconsistent accessibility: parameter type ''x" is less accessible than "y"
C#CC# / help
11mo ago
less accessible??
C#CC# / help
4y ago