c# - How to change the values stored in String as per the condition -
i seek retrieve character sizes xml file , stored in array , after need convert charsize 2 split values string (like if array of 1 25 need display 15,9 , 22 means 15,7 ) , after conversion store in array. struggle logic. please help me.
public static list<string> charsizes(string xmldocpath, string parentnode) { list<string> chsizes = new list<string>(); xmldocument profiledoc = new xmldocument(); profiledoc.load(xmldocpath); xmlnodelist profilelist = profiledoc.selectnodes(parentnode); foreach (xmlelement element in profilelist) { chsizes.add(element["size"].innertext); } homecoming chsizes; foreach (string value in chsizes) { if (chsizes.equals("25")) { homecoming ("15,9"); } else if(chsizes.equals("22")) { split = 15,9; } else if(chsizes.equals("16")) { split=9,7; } } } }
int i; int k = 0; (i = 0; < firstarray.count; i++) { secondarray[k] = firstarray[k].tostring(); { if (firstarray[k] == "25") { secondarray[k] = "15, 9"; } else if (firstarray[k] == "22") { secondarray[k] = "15, 7"; } k++; } } homecoming secondarray; }
c#
No comments:
Post a Comment