- 1

What does it mean public and class in c#!

Pls answer my questions

15th Dec 2019, 10:16 PM
Rayen Touil
Rayen Touil - avatar
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.
15th Dec 2019, 10:21 PM
HNNX 🐿
HNNX 🐿 - avatar
+ 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.
15th Dec 2019, 10:34 PM
Manual
Manual - avatar
16th Dec 2019, 11:34 AM
HNNX 🐿
HNNX 🐿 - avatar
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.
16th Dec 2019, 7:36 AM
Jakub Stasiak
Jakub Stasiak - avatar