(1)
string str = File.ReadAllText(FilePath);
str = str.Replace("origin string", "replace string");
File.WriteAllText(FilePath, str);
(2)
XDocument document;
using (FileStream xmlFile = File.OpenRead(FilePath))
{
document = XDocument.Load(xmlFile);
var element = txtValue.Tag as XElement;
element.Value = txtValue.Text;
document.Save(FilePath);
}
(1) XElement
element.Value = xml의 모든 값들을 의미
element.Name.ToString() = element의 name을 의미
element.Attributes().ElementsAt(index).ToString() = element의 attribute 값
(1)
list = list.Distinct().ToList();