"Partial Methods for Auto-Generated Code"

// File: ExampleClass.AutoGenerated.cs

public partial class ExampleClass {
	public void SomeAutoGeneratedMethod() {
		DoSomethingOnAutoGenMethodCall();
		
		// do other stuff
	}

	partial void DoSomethingOnAutoGenMethodCall(); // If user does not supply implementation in ExampleClass.User.cs this method will not even be compiled and calls to it will be removed
}





// File: ExampleClass.User.cs

public partial class ExampleClass {
	partial void DoSomethingOnAutoGenMethodCall() {
		Console.WriteLine("SomeAutoGeneratedMethod Invoked");
	}
}


Code snippet taken from "Complete C# Quick Reference - C# 2, 3 and 4".