I have the following string expression which am trying to run ,But am getting error saying string format is not correct
for (i = diffvol; i < result.count; i++)
{
B1Volume = Convert.ToDecimal(String.Format("result.Data[0].B{0}Volume", i));
B2Volume = Convert.ToDecimal(String.Format("result.Data[0].B{0}Volume", i));
}