Can I create a private class in C#?

You cannot have a private class unless it is nested . Show activity on this post. In what scenario other then for an innter class would you like to have a ‘private’ class ? You can use the internal modifier to create a class that is only visible in the current assembly.5 Şub 2011

Read more

What is a private class?

A private class is basically a inner class declared as private within another class (outer class) . By doing so you can create a class definition which is accessible only within the outer class. Note: You can not declare a top level class as private.

Read more