Hello Lebesgue,
certainly, class can't be private in terms of C#, but it can be named private
in terms of framework.
If look at IL code you will see "private" identifier, whether you specify
"internal" or not for class it means "almost" nothing for IL.
"almost" means that if you specify "internal" it has effect on initializing
class local variables - in that case IL dosn't create it's own variables
that mapped to the V_* and uses variable that u specified (it doesn't lost
your variables names)
L> So many answers and all wrong...
L> Classes can be public or internal.
L> When you do not specify access modifier, classes are internal by
L> default.
L> "Classes and structs are declared as internal by default unless the
L> keyword public is added to the class definition" [1]
L>
L> [1] Access Modifiers (C# Programming Guide),
L>
http://msdn2.microsoft.com/en-us/library/ms173121.aspx
L>
L> "Altaf Al-Amin Najwani" <al**********@gmail.com> wrote in message
L> news:48**********************************@microsof t.com...
L>
Its PUBLIC by default. YOU CANNOT CREATE PRIVATE, PROTECTED OR
PROTECTED INTERNAL CLASS IN NAMESPACE.
"Michael Nemtsev" wrote:
Hello Tony,
It's private by default
TJ> If you write private class Test {} you have a private class
TJ> If you write public class Test {} you have a public class
TJ> If you write protected class Test {} you have a protected class
TJ> If you write internal class Test {} you have a internal class
TJ> Now to my question
TJ> If you just write class Test {}
TJ> what access is it then on the class Test meaning what is the
default
TJ> access.
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do
not
cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog:
http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche