Scope of Nested Classes
- by Vaccano
If I have a nested class, does anything from the owning class exist in the owned class?
for example:
public class OwningClass
{
int randomVariable = 1;
public void MakingMethod()
{
OwnedClass owned = new OwnedClass();
owned.SomeMethod();
}
private class OwnedClass
{
public void SomeMethod()
{
// Is anything from OwningClass available here?
}
}
}