internal access

Access modifiers are keywords that specify the accessibility of a declared member or type.
public: access is unrestricted;
protected: access is limited to the current class or types derived from the current class;
Internal: access is limited to the current assembly;
private: access is limited to the current class;


Today's protagonist is internal. When I first saw Internal, I didn't know that its access rights were limited to the current assembly, and I didn't know what the concept of assembly was.
The method or attribute modified by internal, as long as it was in the same assembly All other classes can be accessed. If the two are no longer in the same namespace, just use the corresponding namespace on the using reference;
and what is the assembly? Programs compiled into the same dll or exe are in the same assembly.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325846057&siteId=291194637