Multiple Values for a Parameter and C#

Hi, I have this code that i want to allowcate multiple values to a parameter, but it seems to be only assigning the last value to the parameter.

Heres the Code:

string sTemp = myParam.lstItems[i];
string [] split = null;
split = sTemp.Split('~');
foreach (string s in split)
      //Get Parameter Values
      dcParam.Value = s;
      DBG.DBG("Value = [" + dcParam.Value.ToString() + "]");
      //Assign Parameter Values

What is suppose to do is split the delimited string into segments,( this is working) then for each segment assigne the Current value to the pfParam variable.

Could anyone help??
Who is Participating?
DarrenZaiConnect With a Mentor Commented:
I think you need to use the CreateSingleValue function to create a value object and then use that in the add method.

dcParam = pfParam.CreateSingleValue
dcParam.Value = s
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.