I am not quite sure bout that but if I recall correctly,......
if you pass an object it will always be passed by refrence.
But yes you can also specify that using keywords ref (out) or val.
heres an example:
Please do corrcet me if I am wrong!Code:private void button2_Click(object sender, System.EventArgs e) { System.Xml.XmlDocument myDoc = new System.Xml.XmlDocument(); testFunction(myDoc); textBox2.Text = myDoc.SelectSingleNode("//test").InnerText; } private void testFunction(System.Xml.XmlDocument myDoc) { myDoc.LoadXml("<test>value</test>"); }
Stephan





Reply With Quote