namespace ConsoleApplication1
{
class class1
{
protected internal string inf1()
{
Console.WriteLine("
......inf1()
");
return inf1();
}
}
class class2 :class1
{
static void Main(string[] args)
{
class1 c1 = new class1();
class2 c2 = new class2();
Console.WriteLine(c1.inf1());
Console.WriteLine(c2.inf1());
Console.ReadKey();
}
}
Getting Infinite Loop Issue. Process Terminated due to StackOverflowException
?
How to prevent the code from looping infinitely ?
See Question&Answers more detail:os