Class vs. Public Class

前端 未结 3 1489
一个人的身影
一个人的身影 2020-12-23 11:28

What is the difference between:

namespace Library{
    class File{
        //code inside it
   }
}

and:

namespace Library{
         


        
3条回答
  •  时光说笑
    2020-12-23 11:47

    By default, all classes (and all types for that matter) are internal, so in order for them to be accessible from the outside (sans stuff like InternalsVisibleToAttribute) you have to make them public explicitly.

提交回复
热议问题