Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Nested
- {
- internal class Program
- {
- private static void Main()
- {
- new Greeting("Alex").Run();
- }
- private sealed class Greeting
- {
- private readonly string name;
- internal Greeting(string name)
- {
- this.name = name;
- }
- internal void Run()
- {
- Helper.Say(name);
- }
- private static class Helper
- {
- internal static void Say(string name)
- {
- Console.WriteLine("Hello, " + name);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement