Making classes private

I saw you can use the specifier in classes. But wherever I put them it gives an error. Am I doing something wrong?


You should be allowed to use the specifier in a class like you say. If you provide your full script we can check it out

edit: Saam has the answer below, I was only paying attention to the VoteDevice<private>

I believe the compiler is erroring because you are using private on the identifier main. If you want that to be local to your module, you should use <internal> instead of <private>. The other uses of private in your class main look correct to me.

edit: You can read more about access specifiers here:

2 Likes