To help you learn how to programmatically access replication functionality, you can download the following samples from CodePlex. Also, SQL Server Books Online includes a comprehensive set of topics that demonstrate how to program replication. For more information, see Developer's Guide (Replication).
Sales Orders Sample for Merge Replication
This sample demonstrates the benefits of programming merge replication in an application that enables a sales person to manage sales data in a mobile, disconnected state.
Subscriber Monitor Utility Sample for Merge Replication
This sample demonstrates how to use Replication Management Objects (RMO) to monitor a merge subscription at the Subscriber.