Click here to Skip to main content
11,505,486 members (59,436 online)
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
CPallini341.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 512
1 F-ES Sitecore 380
2 Richard Deeming 270
3 CHill60 245
4 Richard MacCutchan 230
0 Sergey Alexandrovich Kryukov 1,067
1 Maciej Los 575
2 Peter Leow 540
3 F-ES Sitecore 525
4 DamithSL 470


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 10 Dec 2012
Copyright © CodeProject, 1999-2015
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