using System;
namespace PCNestedClass {
public class Pc {
public void displayPc() {
Console.WriteLine("Pc: Microsoft Surface");
}
internal class Cpu {
public void displayCpu() {
Console.WriteLine("Cpu: Intel Core i7");
class Program {
static void Main(string[] args) {
Pc pcObj = new Pc(); // Try to comment this row
pcObj.displayPc(); // Try to comment this row
//pcObj.displayCpu(); // this code doesn't work
Pc.Cpu cpuObj = new Pc.Cpu();
cpuObj.displayCpu();