Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
somewhere it written private and somewhere its internal,so i am bit confused.
Posted

You better refer C# Language Specification[^]
as per that class having internal access modified and constructor having privet access modified as default. check What are the Default Access Modifiers in C#?[^] for more information
 
Share this answer
 
For a class default access modifier :is
1. Internal if class declared directly within a namespace
2. private if it is a nested class
For more have a look here: http://msdn.microsoft.com/en-us/library/ms173121.aspx[^]

For constructor default access modifier is:
private if programmer defines it but if no constructor is explicitly defined by programmer, a public default constructor will be automatically defined)
For more have a look at: http://stackoverflow.com/questions/2521459/what-are-the-default-access-modifiers-in-c[^]

Thanks.
 
Share this answer
 
v2
It is by default public. However you can change it as per your requirement.
 
Share this answer
 
By default its Public but you can change it as per your requirement
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900