Agree with Wiktor; if the outer class's method isn't static then it must be called on an instance. It's no different to any other "call a method on an instance" scenario; the class code wishing to call the method must know about the instance on which the method is to be called. If some other code elsewhere has created both the outer and the inner then it is the only thing that knows about both and is responsible for giving the outer instance to the inner instance so that the inner code can know about the outer and call methods on it:
class OutterClass
{
public void OutterMethod()
{
Console.WriteLine("Outter method");
}
public class InnerClass
{
private OuterClass _outer;
public InnerClass(OuterClass outer){
_outer = outer;
}
public void InnerMethod()
{
_outer.OutterMethod();
Console.WriteLine("Inner method");
}
}
}
How the inner instance gets to know about the outer is up to you: constructor parameter, property, set method.. Which you pick depends on things like whether the outer is vital to the functioning of an inner and hence an inner should never be made without an outer being passed (use a constructor), or whether the outer can be changed after inner is made, but "when should I use a constructor vs prop vs x?" is out of scope for this question