public class Test { void Bar () { G g = G.Instance; } // When it goes outside, there is no error. public class G { public static G Instance; } public static void Main () { } }