DataColumnCollection Inherit !!

D

daniel

i wirte a "class b" to inherit DataColumnCollection,
but it show a error message that is 'method of DataColumnCollection is not
anyone overloadding to use zero of argument'

The following it is written by me :


public class b : System.Data.DataColumnCollection
{
}
 
Y

Yunus Emre ALPÖZEN

DataColumnCollection class has no constructor. It inherits from
InternalDataCollectionBase. There must a constructor at least protected in a
base class. In fact, In coding DataColumnCollection must be defined as a
sealed class. For instance

class A
{
//Private or Internal
private A(){}
}
class B
{
protected B(){}
}

class C:A // It is not valid. Cannot access constructor
{
}

class C:B // It is valid. Can access contructor. Also can override
constructor modifier (means can have a public constructor)
{
}
 

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