top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is an internal modifier in context of c#?

+1 vote
294 views
What is an internal modifier in context of c#?
posted Dec 1, 2014 by Balu

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

• Internal members can access only from within the same assembly (.dll).
• We can declare a class as internal, its member as internal or its fields as internal.
• Use internal keyword before the class declaration to create an internal class.
• Internal type can't access from external program.
• Classes defined within the current assembly can access internal classes.

answer Dec 1, 2014 by Manikandan J
Similar Questions
+1 vote
using System;

namespace CareerRideTest
{    
  class A
  {    
    public A()
    {
      Console.WriteLine("I am in A");
    }
  }

  class B : A
  {
    public B()
    {
      Console.WriteLine("I am in B");
    }
  }

  class C : B
  {
    static C()
    {
      Console.WriteLine("I am in Static C");
    }
    public C()
    {
      Console.WriteLine("I am in C");
    }
  }    

  class MainClass
  {
    static void Main(string[] args)
    {
      C obj = new C();    
      Console.ReadKey();    
    }
  }    
}
...