using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Consolepractice
{
class Program
{
public static void Main(string[] args)
{
Outer.Inner.msg();//no need to create the instance of static nested class
Console.ReadKey();
}
}
class Outer
{
static int data = 10;
public static class Inner
{
public static void msg()
{
Console.WriteLine("data is="+data);
}
}
}
}Here I will explain example of static nested class example with static method in C#.
