What happens when we create an instance of class in same class?


This question already has an answer here:


Its not a problem. For example:

public class Class1
  public Class1 Instance {get; set;}

public class Class2
     public void Test()
         Class1 class1 = new Class1();
         var nestedInstance = class1.Instance;

Please read about singleton pattern: https://msdn.microsoft.com/en-us/library/ff650316.aspx This let you to understand this case

Need Your Help

Occupy full width - facebook app

facebook facebook-graph-api canvas frame

I have a facebook application that needs exactly 1280 pixels of width to display correctly.

Centralize div and scale to fit screen

css html mobile centralized

For my website I have been trying to centralize the entire content for display on mobile devices: