By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,231 Members | 1,707 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,231 IT Pros & Developers. It's quick & easy.

DataRow specialization

P: n/a
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
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

"Marcel Sottnik" <so*****@removethisoption.ch> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.