[C #] Inconsistent accessibility

less than 1 minute read

When I created a class to manage resources in C #
“CS0053 Accessibility is inconsistent.
The accessibility of the property type’Resources’ is set lower than that of the property’ResourceManager.Resources’. 』\
I got the error.

The code looks like the following.

Resource management class

    public class ResourceManager : INotifyPropertyChanged
        /// <summary>
        /// </summary>
        public static ResourceManager Current { get; } = new ResourceManager();

        /// <summary>
        ///Multilingual resources
        /// </summary>
        public Resources Resources { get; } = new Resources();

        ///It doesn't matter from here to below, so omit it

When you see an error, both the ResourceManager class and the Resources property
Why is there no problem because it is “public”? I thought, but when I often see errors
I wrote that the Resources class is not good, not the property.

And the cause is this ↓

The access modifier of the resource is “internal”.
The punch line that it was an error because it was released as “public”.