for (int i = 0; i < CompXMLDataSet.Tables.Count; i++) { DataTable DT = CompXMLDataSet.Tables[i]; string TagName = DT.TableName.ToString(); //if (TagName == "COMPONENT") if (TagName == "COMPONENT") { for (int j = 0; j < DT.Rows.Count; j++) { if (DT.Rows[j]["name"].ToString() == classname) { string Componentid = DT.Rows[j]["Component_id"].ToString(); for (int ii = 0; ii < CompXMLDataSet.Tables.Count; ii++) { DT = CompXMLDataSet.Tables[ii]; TagName = DT.TableName.ToString(); if (TagName == "VAR") { DataRow[] dtrow = DT.Select("Component_id=" + Componentid); for (int k = 0; k < dtrow.Length; k++) { if (Convert.ToInt32(dtrow.ElementAt(k)["vid"]) == cid) { ParType = GetParType(dtrow.ElementAt(k)["type"].ToString()); return ParType; } } }// if loop for TagName=="VAR" } }// if loop to check class name } // For loop } //if loop for TagName=="COMPONENT" }
from e in xmlDoc.Descendents("components") where e.Elements("name") == somevalue ...
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)