C# Developers' Journal (original) (raw)
help! i need to read an xml line and display a certain part of it.
XmlIO xml_io = new XmlIO(Common.BasePath + "Photo.exe.config");
string val = null;
if (xml_io.ReadValue("appSettings", ref val))
{
string a = val.Remove(0,56);
txtCurTeeSheetServer.Text = a;
}
else
{
MessageBox.Show("Either cannot read file or cannot read specified value.");
}
this is the line
i want to be able to display "localhost" in a textbox but it wont always be localhost obviously...the way i am doing it right now just trims the beginning...any idea how i can trim the end knowing that "localhost" will change dynamically