Private class public Members?

  • Thread starter Thread starter Klaus Löffelmann
  • Start date Start date
K

Klaus Löffelmann

Hi,

how is it possible to have a private class with public members?
When doing some reasearch about double buffered paint actions, I stumbled on
a class GraphicBufferManager which is declared private but has public
members. Since this class is not nested in another one, how is it possible
to declare a class as private, anyway?

Thanks,

Klaus
 
* "Klaus Löffelmann said:
how is it possible to have a private class with public members?

Declare the class as 'Private'.
When doing some reasearch about double buffered paint actions, I stumbled on
a class GraphicBufferManager which is declared private but has public
members. Since this class is not nested in another one, how is it possible
to declare a class as private, anyway?

Where did you find this class?
 
Klaus,
I suspect that it is really Friend to the assembly where it is defined, and
you are seeing it as private "in respect" to the assembly you are in.

Hope this helps
Jay
 
Hi Herfried,

the class is used by WMPaint of class Control, and WMPaint in turn is called
by WndProc of class Control.
It's purpose - at least I think so - is to handle the internal double
buffering of the painting stuff.
I found it using the .NET Reflector (http://www.aisto.com/roeder/dotnet/).

By the way: How do you declare a class as Private, if it is not nested in a
public/friends class?

Klaus
 
Back
Top