DataColumnCollection Inherit !!

  • Thread starter Thread starter daniel
  • Start date Start date
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
{
}
 
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)
{
}
 
Back
Top