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
{
}
 
Back
Top