TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
pashi
NA
17
0
: cannot convert from 'string[]' to 'string' what is this error abt?
Mar 7 2007 8:56 AM
Hi i sorry, if any big blunders i am very new to this kind of programming plese help me actually i have collected some values from xml file and i need to disply them so i wrote public string[] GetLaserProp(string laserid, string parentnode1, string childnode1) { XmlDocument xmldoc = new XmlDocument(); xmldoc.Load(@"E:\Dropdown_XML\laserProp.xml"); string[] str = new string[5]; // XmlNodeList xmlnodelst = xmldoc.GetElementsByTagName("laser"); XmlNodeList xmlnodelst = xmldoc.GetElementsByTagName(parentnode1); //return xmlnodelst; //foreach (XmlNode.parentnode in xmlnodelst) foreach (XmlNode parentnode in xmlnodelst) { //MessageBox.Show(parentnode.Attributes.Item(0).Value); if (parentnode.Attributes.Item(0).Value == laserid) { xmldoc.LoadXml(parentnode.InnerXml); //XmlNodeList xmlchildnodelst=xmldoc.GetElementsByTagName("gauge"); XmlNodeList xmlchildnodelst = xmldoc.GetElementsByTagName(childnode1); // cmbChildLaser.Items.Clear(); foreach (XmlNode childnode in xmlchildnodelst) { for (int i = 0; i < childnode.ChildNodes.Count; i++) { //cmbChildLaser.Items.Add(childnode.ChildNodes.Item(i).Attributes.Item(0).Value); for (int j = 0; j < childnode.ChildNodes.Item(i).Attributes.Count; j++) { // MessageBox.Show( str[j]= childnode.ChildNodes.Item(i).Attributes.Item(j).Value; //cmbChildLaser.Items.Add(xmlnodelst1.Item(ii).ChildNodes.Item(0).InnerText); return str; } } } } } //return (Student []) students.ToArray();} return str;
Reply
Answers (
1
)
how to open C#.net 2005 file in .net 2003
Can't get keys from App.config file - am I missing something?