// File: ExampleClass.Alpha.cs
public partial class ExampleClass {
public void Print() => DoThing();
partial void DoThing() {
Console.WriteLine("AAA");
}
}
// File: ExampleClass.Beta.cs
public partial class ExampleClass {
partial void DoThing() {
Console.WriteLine("BBB");
}
}
// Elsewhere
static void Test() {
var ec = new ExampleClass();
ec.Print(); // Prints AAA and BBB to console (order unspecified).
}