Using Internal on Members : internal « Class « C# / CSharp Tutorial






public class ComponentGroup{
    public ComponentGroup(){
        objects = new Component[10];
        objectCount = 0;
    }
    public void AddObject(Component obj)
    {
        if (objectCount < 10)
        {
            objects[objectCount] = obj;
            objectCount++;
        }
    }
    public void Render(){
        for (int i = 0; i < objectCount; i++)
        {
            objects[i].Render();
        }
    }
    
    Component[]    objects;
    int            objectCount;
}
public class Component
{
    internal void Render() {}
}
class Test
{
    public static void Main()
    {
        ComponentGroup group = new ComponentGroup();
        group.AddObject(new Component());
    }
}








7.19.internal
7.19.1.Use internal
7.19.2.Using Internal on Members