internal vs public in c#

前端 未结 7 1140
野趣味
野趣味 2020-11-29 04:07

I want to know the difference between the public and internal visibility modifiers.

When should we use internal on a class and

7条回答
  •  生来不讨喜
    2020-11-29 04:59

    Also, properties marked as internal will throw a BindingExpression path error if used for DataBinding in WPF. So those have to be public in order to work properly, even when the DataBinding takes place within the same assembly.

提交回复
热议问题