I am using a DataTable which has a total column within it which adds all the the columns up to give a final value. But I need to make it so if the total is over a limit it will give a message like “You have gone over what you are allowed”.
so it would look something like this
if(dt.Column("Total") > 30)
{
//Display message in label
}
You can use the “old”
DataTable.Computemethod with a columns expression, for example:Here’s the “modern” Linq approach: