Using Internal on Members : Internal : Class C# Examples


C# Examples » Class » Internal »

 

Using Internal on Members









    
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());
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Class
» Internal