PS Attach an event receiver

You can use the following code to attach an event receiver to the list

CODE