static void Main(string[] args) { private1 p1 = new private1(); private2 p2 = p1.foo(); Console.WriteLine(p2.Value); Console.ReadLine(); }
public private2 foo() { private2 p2 = new private2("I was created inside a different private class!"); return(p2); }