Difference between “strict private” and “protected” Access Modifiers in Delphi?

后端 未结 5 1931
野趣味
野趣味 2020-12-31 03:23

but I learn programming and after structured programming with Pascal language, I\'m beginning to learn about OOP with Delphi.

So, I don\'t really understand the diff

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-31 04:02

    strict private - visible and accesible only from within this class.

    private - visible and accesible only from within this class AND this class unit.

    protected - the same as private PLUS from within descendant classes

    You can read more about and idea of encapsulation here: http://en.wikipedia.org/wiki/Encapsulation_%28computer_science%29#Encapsulation

提交回复
热议问题