When using property attributes and class and variables
I am somewhat confused with the attributes of class properties and variables
for example when not using a varible with a public or private internal classes as concepts or functions here I got, I could explain with some simple examples to visualize it better thanks!
at what point should I use a variable: private, public, protect, internal
how to use the attributes of a class as: internal, private, protected, public, static
so please explain me with some examples in order to understand
Access control attributes to variables:
public: available to any call
private: available only to the class that defines
protect: available only to the class that defines and subclasses of that class
internal: cauqluier available for call within the same package
Class property attributes:
internal (default): Visible to references inside the same package.
private: Visible to references in the same class.
protected: Visible to references in the same class and derived classes.
public: Visible to references everywhere.
static: Specifies that an object belongs to the class rather than to the instances of the class.
UserDefinedNamespace: Name space for custom user-defined names.