|
-
Jan 18th, 2003, 01:41 PM
#1
Namespaces and visibility.
I'm trying to derive my own class from System.Drawing.Image which represents a bitmap stored in a DirectDraw offscreen surface.
But when I compile it gives me the error
'System.Drawing.Image.Image()' is inaccessible due to its protection level
for every constructor of my class.
Now I would normally guess that this means the constructor is protected, internal or private. But:
It can't be protected, my derived class would have access to it.
It can't be private, else no class could be derived from Image (there's no friend keyword in C#, right?).
It can't be internal, because a) I placed my image class in System.Drawing and b) System.Drawing.Imaging.Metafile is derived from Image and has access.
Why does it deny me the access? How can I solve this problem?
Code:
public class DdImage : System.Drawing.Image
{
//...
public new int Flags
{
get
{
return 0;
}
}
public new Guid[] FrameDimensionsList
{
get
{
return null;
}
}
// etc.
}
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|