No constructors defined

  • Thread starter Thread starter shapper
  • Start date Start date
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
 
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.
 
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
Constructor 3
constructor inheritance 1
Generate Property 3
ObjectContext 5
const 3
When do we want to privatize the default parameterless constructor? 2
Problem with perl, cgi & pdf 1

Back
Top