J
J055
Hi
I'm a little confused by this so would appreciate some advice on ways to
deal with the following. When I call the CodeMaker.Update static method for
the second time I want the dt parameter to have the same value as when
called the first time. What would be the best approach (and simplest) way to
deal with this?
Cheers
Andrew
(still quite new to C# and DOTNET)
class mainclass
{
private void BuildProcsOutputText(DataTable dt)
{
StringBuilder sb = new StringBuilder();
sb.Append(CodeMaker.Update(dt));
sb.Append(CodeMaker.Update(dt));
Output.Text = sb.ToString();
}
}
class CodeMaker
{
public static string Update(DataTable dt, string tableName)
{
dt.Rows.Remove(dt.Rows[0]);
// do something with the DataTable and return a string
return str;
}
}
I'm a little confused by this so would appreciate some advice on ways to
deal with the following. When I call the CodeMaker.Update static method for
the second time I want the dt parameter to have the same value as when
called the first time. What would be the best approach (and simplest) way to
deal with this?
Cheers
Andrew
(still quite new to C# and DOTNET)
class mainclass
{
private void BuildProcsOutputText(DataTable dt)
{
StringBuilder sb = new StringBuilder();
sb.Append(CodeMaker.Update(dt));
sb.Append(CodeMaker.Update(dt));
Output.Text = sb.ToString();
}
}
class CodeMaker
{
public static string Update(DataTable dt, string tableName)
{
dt.Rows.Remove(dt.Rows[0]);
// do something with the DataTable and return a string
return str;
}
}