Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
what happens putting a private access specifier in front of class in C#?
Posted 10-Dec-12 1:29am
Edited 10-Dec-12 2:20am
CPallini317.4K
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

there is no private class in C# but you can use keyword internal, making the class visible only in the assembly it constains(dll).
 
but you can make a class private if it is declared inside another class (nested class)
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

it won't allow us to send parameters to next page
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi as per My knowledge C# doesn't allow to create private class.
 
if u need much more info on this you can refer
http://stackoverflow.com/questions/3574404/can-you-create-private-classes-in-c[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

"A private class/constructor means that a class cannot be created anywhere but inside its own methods"
 
--SJ
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 398
1 CPallini 333
2 George Jonsson 270
3 OriginalGriff 159
4 Prasad Khandekar 135
0 OriginalGriff 4,613
1 CPallini 3,340
2 Sergey Alexandrovich Kryukov 2,771
3 George Jonsson 2,254
4 Gihan Liyanage 2,020


Advertise | Privacy | Mobile
Web02 | 2.8.140905.1 | Last Updated 10 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100