I have another quesry related to this, in the same for loop,
I want to concat both string and assing to one variable.
Again, I have 16 variables of "Ref" type, (Like ref string PstrVP1, ref string PstrVP2, ref string PstrVP3)
"PstrVP" + i = LstrCurrentVP + LstrPriorVP;
for (int i = 1; i <= 16; i++)
{
string LstrCurrentVP = string.Empty;
string LstrPriorVP = string.Empty;
MethodInfo buildVP = this.GetType().GetMethod("BuildVP" + i + "Str");
LstrCurrentVP = (string)buildVP.Invoke(this, new object[] { LobjCurrentVehiclePremiumsList, LstrCurrentVP, "Current" });
LstrPriorVP = (string)buildVP.Invoke(this, new object[] { LobjCurrentVehiclePremiumsList, LstrCurrentVP, "Prior" });
Open in new window