Define and use partial class : Partial Class « Class « C# / CSharp Tutorial






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); 
  } 
}
0,0








7.29.Partial Class
7.29.1.Define and use partial class
7.29.2.A partial class can span multiple source files.