I would like to know how can I create different variables according to the value of a property.
Example:
foreach (DataColumn column in entry.Columns)
{
if(column.ColumnName.Contains("weight") ||
column.ColumnName.Contains("amount"))
float column.ColumnName = 0;
}
In this case the code would create as much variables as columns in entry contains the selected words and the variables would be called as the columnName property.
Thanks in advance.
I think for that purpose could be used Dictionary