- 1
What does it mean public and class in c#!
Pls answer my questions
5 Answers
+ 4
â ïž edit : as some have pointed out, this reply is inaccurate and is simplified based on my java knowldge
public is access modifier
An access modifier can be:
public - visible to everyone
protected - only visible to class /subclass
private - can only be seen by the class it's in
Everything in object oriented programing is a class - it's where you write all your attributes and methods
Think of it as a blueprint for creating objects.
+ 4
Rayen Touil
You need to add proper descriptions to your question.
I also feel this question, can be answered by the course and/ or a quick online search.
+ 1
Jakub Stasiak & Mirielleđ¶ [Inactive] - fixed my post
0
HNNX đż in c# we have more access modifiers:
internal - visible inside assembly
private protected - visible for classes that inherit our class and are in the same assembly.
BTW your definition of "protected" is wrong... protected means that fields and methods are visible for inherited classes only.