Code Sample : How to associate a SharePoint Workflow to a list programmatically

The following code sample illustrates how to associate a workflow to a list based on the workflow name.