Define and use partial class : Partial Class : Class C# Examples


C# Examples » Class » Partial Class »

 

Define and use partial class









    
using  System;  

partial  class  XY  {  
    int  x;  
  
    public  int  X  {  
        get  {  return  x;  }  
        set  {  x  =  value;  }  
    }  
}


partial  class  XY  {  
    int  y;  
  
    public  int  Y  {  
        get  {  return  y;  }  
        set  {  y  =  value;  }  
    }  
}

  
class  MainClass  {  
    public  static  void  Main()  {  
        XY  xy  =  new  XY();  
  
  
        Console.WriteLine(xy.X  +  ","  +  xy.Y);  
    }  
}
    
   
  
   



Output

0,0


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Class
» Partial Class