Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Internal in C#

Since the both classes (Program1 and Program2) are in the same project, it is legal to use internal keyword for accessing.

using System;
using System.IO;

namespace forgetCode
{
    class program1
    {
        static void Main(string[] args)
        {
            program2 obj = new program2();
            string new_name = obj.name;
            Console.WriteLine(new_name);

        }
    }

   class program2
    {
       internal string name = "Forget Code";
    }
}


Output:
Forget Code

..