DataRow specialization

  • Thread starter Thread starter Marcel Sottnik
  • Start date Start date
M

Marcel Sottnik

Hello group

Maybe this is not the right NG, but this problem seems to me to be more
language related than ADO.NET.

How can I write the constructor for specialization of DataRow which will
take a datarow as parameter. Something like:

class MyDataRow : DataRow
{
public MyDataRow(DataRow row) : base(row)
{
}
}


Thx
 
Base class - DataRow doesn`t have a public constructor, so 'public
MyDataRow(DataRow row) : base(row)' gives a syntax error.

You can use the 'semi-hidden' constructor protected internal
DataRow(DataRowBuilder builder);

Microsoft discourages use of this member.

This is a snippet from a typed DataSet generated by Visual studio
(Generated code):

public class KukuRow : DataRow
{
private KukuDataTable tableKuku;

internal KukuRow(DataRowBuilder rb) :
base(rb)
{
this.tableKuku = ((KukuDataTable)(this.Table));
}

......

}


Hopes it helps

Boaz ben-Porat
Milestone Systems
 
Back
Top