内部关键字允许您设置内部访问说明符。
内部访问说明符允许类将其成员变量和成员函数公开给当前程序集中的其他函数和对象。
任何具有内部访问说明符的成员都可以从定义该成员的应用程序内定义的任何类或方法中进行访问。
using System;
namespace RectangleApplication {
   class Rectangle {
      internal double length;
      internal double width;
      double GetArea() {
         return length * width;
      }
      public void Display() {
         Console.WriteLine("Length: {0}", length);
         Console.WriteLine("Width: {0}", width);
         Console.WriteLine("Area: {0}", GetArea());
      }
   }
   class Demo {
      static void Main(string[] args) {
         Rectangle rc = new Rectangle();
         rc.length = 10.35;
         rc.width = 8.3;
         rc.Display();
         Console.ReadLine();
      }
   }
}