I am new to OOP and I am just starting my adventure with C#. I recently came across a topic on StackOverflow, where somebody asks how is it even possible to create a instance of a class inside of the class itself.
public class My_Class
{
My_Class new_class= new My_Class();
}
My question is why would we ever want to do something like this? I tried to do a bit of searching on the forum but most of the discussions seem to be about how does this not create an infinite loop etc.
A simple example would be much appreciated (or perhaps a suggestion on what phrase to google)