P
Paolo
I want to format the output from LINQ queries. At the moment if I do ...
private void btnAllTransactions_Click(object sender, EventArgs e)
{
var query =
from trans in dataSet.Transaction
select new
{
trans.T_Date,
trans.T_PayeeId,
trans.T_Category,
trans.T_SubCategory,
trans.T_PayMethod,
trans.T_Amount
};
foreach (var item in query)
{
richtxbxAnalysis.AppendText(item.ToString() + "\n"); <<<<<
}
}
.... I get a default list, and I cannot apply formatting to the output.
I know that ToString() can be overridden as part of a class but how would I
achieve such an override in the example above? To which class, if any, would
I apply the override?
Thanks
private void btnAllTransactions_Click(object sender, EventArgs e)
{
var query =
from trans in dataSet.Transaction
select new
{
trans.T_Date,
trans.T_PayeeId,
trans.T_Category,
trans.T_SubCategory,
trans.T_PayMethod,
trans.T_Amount
};
foreach (var item in query)
{
richtxbxAnalysis.AppendText(item.ToString() + "\n"); <<<<<
}
}
.... I get a default list, and I cannot apply formatting to the output.
I know that ToString() can be overridden as part of a class but how would I
achieve such an override in the example above? To which class, if any, would
I apply the override?
Thanks