What is the difference between:
namespace Library{
class File{
//code inside it
}
}
and:
namespace Library{
public class File{
//code inside it
}
}
So what will be the difference between public class and class?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Without specifying
publicthe class is implicitlyinternal. This means that the class is only visible inside the same assembly. When you specifypublic, the class is visible outside the assembly.It is also allowed to specify the
internalmodifier explicitly: