K
K
KornoosVildberg2020-06-13 10:21:50
C++ / C#
KornoosVildberg, 2020-06-13 10:21:50

"Accessibility inconsistency" and "not available due to its security level". How to fix?

Good day! I really need help with a project. They gave a course paper, but at the final stage an error popped up inconsistency in accessibility.
In general, the project for my term paper is about a pet store. The bottom line is that I have tables in the database, and in the program I work with them. I have made modules to transfer information, but they just let me down. I don't know what's wrong. The teacher said that he could not help and sent him to decide.
Help me please. It's gotten to the point of a nervous breakdown.
I really don't understand and you can throw stones, but please help.

And there are 6 such errors

"Severity Code Description Project File String Suppression state
Error CS0051 Accessibility inconsistency: Accessibility of parameter type "ModelAnimalpark" is lower than accessibility of method "AnimalEdit.AnimalEdit(ModelAnimalp ark)" ZooMail C:\Users\Kornoos Vildberg\Desktop\2.0 Prog by KP\ZooMail\ZooMail\AnimalAccounting \AnimalEdit.xaml. cs 31 Active

If you change their access from public to private, then an access level error occurs. Help me please.
5ee47e35c0795202762172.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lil_toady, 2020-06-15
@KornoosVildberg

This occurs when the scope of the argument type is lower than the scope of the method itself. Perhaps ModelAnimalparkyour class is marked as internal, or not marked at all (by default internal), and the class AnimalEditand its constructor are public.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question