A partial class can span multiple source files. : Partial Class « Class « C# / CSharp Tutorial






using System;


public partial class MyClass {

    public void CoreMethodA() {
        Console.WriteLine("MyClass.CoreA");
    }
}

public class Starter {
    public static void Main() {
        MyClass obj = new MyClass();
        obj.CoreMethodA();
        obj.ExtendedMethodA();
    }
}


public partial class MyClass {

    public void ExtendedMethodA() {
        Console.WriteLine("MyClass.ExtendedA");
    }
}








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