Это вопрос скорости. У меня есть следующий код:
if (MyXMLReader.SearchForValue(command, new List<string>() { "/Command/Descriptions/Description/System" }, ((TabDocument)dockManager.ActiveDocument).version))
{
txtBox_desc.Text = MyXMLReader.GetValue(command, "/Command/Descriptions/Description[" + MyXMLReader.SearchForValue_Int(command, new List<string>() { "/Command/Descriptions/Description/System" }, ((TabDocument)dockManager.ActiveDocument).version) + "]/Content");
}
if (MyXMLReader.SearchForValue(command, new List<string>() { "/Command/Uses/Use/System" }, ((TabDocument)dockManager.ActiveDocument).version))
{
txtBox_use.Text = MyXMLReader.GetValue(command, "/Command/Uses/Use[" + MyXMLReader.SearchForValue_Int(command, new List<string>() { "/Command/Uses/Use/System" }, ((TabDocument)dockManager.ActiveDocument).version) + "]/Content");
}
if (MyXMLReader.SearchForValue(command, new List<string>() { "/Command/Notes/Note/System" }, ((TabDocument)dockManager.ActiveDocument).version))
{
txtBox_notes.Text = MyXMLReader.GetValue(command, "/Command/Notes/Note[" + MyXMLReader.SearchForValue_Int(command, new List<string>() { "/Command/Notes/Note/System" }, ((TabDocument)dockManager.ActiveDocument).version) + "]/Content");
}
Должен ли я создать новую string
переменную для хранения
((TabDocument)dockManager.ActiveDocument).version?
Будет ли это выгоднее с большей скоростью и отзывчивостью? Это будет плохо или хорошо?