.split() will work for you..
string result=1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1;
string strResultValue="";
string[] strArrRestul=result.split(',');
for(int intLoop=0;intLoop<strarrresult.length;intloop++)>
{
if(strArrResult[intLoop]=="2")
{
strResultValue=strArrResult[intLoop];
}
}
Explanation:
you are just storing your data in string Array with delimiter as comma(,) with the need of split method
then in string array you are searching your desired data..
in split() you can give any delimiter which is in your result variable.