Answer:
No we can declare private class in namespace, it will give compile time error.
Example:
namespace example
{
private class ex //error
{
}
}
"Error: Elements defined in a namespace cannot be explicitly declared as private, protected, or protected internal"
Asked In: Many Interviews |
Alert Moderator