Aside from proper diet and making sure that you provide your body with nutrients that will allow you to grow and gain weight, resistance training will play an important role for your gains.
An ectomorph’s workout routines should concentrate on compound weightlifting exercises like bench presses, military or overhead presses, dips, chin ups, pull ups, squats, and dead lifts. Select weights that will enable you to do 8-12 reps per set. My personal preference is 8 reps per set. Reps higher than these may tone your muscles but may not significantly signal your body into muscle growth. As an alternative, you could also do 5 reps for 5 sets.
Limit your workouts to a maximum of an hour each session. Do this for at least 2-3 times a week. Anymore than these would lead to over training and would become counter productive. Keep in mind that muscles are not built in the gym while lifting weights. Muscles are built while resting the body and providing proper nutrition after doing a short but intense work out.
With determination, a weight gain diet, and a solid weight training program you will be better equipped in the quest of gaining weight. Once results are evident, you’ll feel better about yourself and notice that your physique is a whole lot better too. This will boost additional self confidence that will help you achieve other goals in life.
Here's a link for bodybuilding exercises: http://www.bodybuilding.com/fun/exercises.htm
Best of luck.