-1
XML 파일에서 문자 크기를 가져 와서 배열에 저장하려고 시도한 후 charsize를 두 개의 분할 값 문자열로 변환해야합니다 (예 : 1의 배열은 25이고 15,9로 표시해야하고 22는 15,7을 의미합니다.) 변환 후 다른 배열에 저장됩니다. 나는 그 논리와 투쟁한다. 아무도 나를 도와주세요.조건에 따라 문자열에 저장된 값을 변경하는 방법
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);
}
return chsizes;
foreach (string value in chsizes)
{
if (chsizes.Equals("25"))
{
return ("15,9");
}
else if(chsizes.Equals("22"))
{
split = 15,9;
}
else if(chsizes.Equals("16"))
{
split=9,7;
}
}
}
}
」등 (1)의 배열은 전 15,9로 표시해야 25, 22 25,7 수단이 "바꿔주세요 지나치게 의식을하지 ... – apomene