Inheritance from SPFile class.

G

Guillaume

Dear All,

I am trying to make a class that inherits from SPFile sharepoint
class:

public class NDFile : Microsoft.SharePoint.SPFile
{
...
}

When compiling, I get the following error:

"The type 'Microsoft.SharePoint.SPFile' has no constructors defined"

As Sharepoint documentation says that SPFile is a public class (that
is not sealed), I don't understand why it is not working.

What did I do wrong?

Many thanks for your help!

Best,

Guillaume.
 
T

Tom Porterfield

Guillaume said:
Dear All,

I am trying to make a class that inherits from SPFile sharepoint
class:

public class NDFile : Microsoft.SharePoint.SPFile
{
...
}

When compiling, I get the following error:

"The type 'Microsoft.SharePoint.SPFile' has no constructors defined"

As Sharepoint documentation says that SPFile is a public class (that
is not sealed), I don't understand why it is not working.

What did I do wrong?

The class is public but the constructors are not, so they are inaccessible
to you, making inheritence impossible.
 

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

Top