如何将对象解析为标签 [英] how to parse an object to a lable
本文介绍了如何将对象解析为标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图更新我的标签,以便当用户点击新按钮时,它必须获取xmlnode并将数字更新为字符串。我怎么能这样做
Am trying to update my label so that when the user click new button it must get the xmlnode and update the number to a string. how can i do that
int updateversion = 1000;
updateversion++;
XmlNode myNode = root.SelectSingleNode("descendant::resheader[@name = 'version']/value");
myNode.InnerText = updateversion.ToString();
lblversion.Text = myNode.ToString();
推荐答案
myNode只是对象,你需要告诉你什么想要从那个对象获得
myNode is just the object, you need to tell what you want to get from that object
label.Text = myNode["nodename"].InnerText;
这篇关于如何将对象解析为标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文