Dear Expert
I am new in C# also in window app development.
It is my first App.
I am try to develop a universal windows app in C#, My app use a recursive function due to this function there is System Stack overflow exception.
In recursive function i am reading (.xml) file, to read all node of this file i call it recursively after reading 6-7 node it give System Stack overflow exception.
My function is like :
Class read
{
ReadNode(IXmlNode node, FileName);
}
ReadNode(IXmlNode node, FileName)
{
// reade node data
IXmlNode ChildNode= node.Child;
while(ChildNode)
{
ReadNode(ChildNode, FileName) ;
ChildNode =ChildNode.NextSibling;
}
}
Is there is any solution to solve this System Stack overflow exception without changing my recursive function.
This recursive function work well in a Dialog base window Application in visual studio2010 in VC++;
Thanks in Advance

Afzaal Ahmad ZeeshanRank #60 · 27.6K reputationPosted Mar 21, 2016, 11:25 AM EDT
private IXmlNode node { get; set; } private string FileName { get; set; } // I hope the type is string. void ReadNode() { // get the XML node IXmlNode ChildNode = node.Child; while (ChildNode != null) { // Update the values for fields ReadNode(); ChildNode = ChildNode.NextSibling; } }Anuj Kumar7 reputationPosted Mar 22, 2016, 9:29 PM EDT