No constructors defined

S

shapper

Hello,

I have the following:

public class PdfFileModel : PDFFile {
}

I get the error:
The type 'Components.PDFRender.PDFFile' has no constructors defined

What am I missing?

Basically, what I am trying to do is to have my own application class
that wraps a commercial library class named PDFFile.

Thanks,
Miguel
 
G

Göran Andersson

shapper said:
Hello,

I have the following:

public class PdfFileModel : PDFFile {
}

I get the error:
The type 'Components.PDFRender.PDFFile' has no constructors defined

What am I missing?

Basically, what I am trying to do is to have my own application class
that wraps a commercial library class named PDFFile.

Thanks,
Miguel

You can't inherit from the class as it doesn't have any public constructors.

You will have to encapsulate it instead of inheriting it.
 
T

Tony Johansson

When you do this the default public C-tor is called in PDFFile but
when no one is found you get error message telling you so.

//Tony

public class PdfFileModel : PDFFile
{
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Clear Stream 8
Generate Property 3
Constructor 3
constructor inheritance 1
const 3
ObjectContext 5
PDF export buggy? 2
Problem with perl, cgi & pdf 1

Top