C
C#5w ago
thomas

✅ Inconsistent accessibility: parameter type ''x" is less accessible than "y"

I'm getting this weird error here. Probably some namespace wizardry i'm not aware of.
12 Replies
reflectronic
reflectronic5w ago
Program needs to be a public class, since the constructor is public add public partial class Program; to your Program.cs
Angius
Angius5w ago
Or make it internal and use InternalsVisibleTo attribute
ero
ero5w ago
that's not what the error refers to
thomas
thomasOP5w ago
im using top level statements
ero
ero5w ago
so do this
thomas
thomasOP5w ago
like this?
No description
ero
ero5w ago
yes
thomas
thomasOP5w ago
It works now kinda confused ab how should i've come up w that random public partial class lol
Angius
Angius5w ago
By knowing what top-level statements generate But yeah, it's not exactly front-and-center knowledge
ero
ero5w ago
but also isn't it weird to reference Program anywhere? is this normal for this stuff?
thomas
thomasOP5w ago
I need it for tests

Did you find this page helpful?