How can I access the method DoSomething()
here? I can't access it when I create an object of type SomeClass
.
On the other hand, what is the use of having a private class inside a public class?
public class SomeClass
{
public string str = string.Empty;
private class SomePrivateClass
{
public void DoSomething()
{
...
}
}
}