The purpose of the Builder pattern is to abstract the complex creation of an object from the object's implementation. In other words, if you have a simple object, let's say a Person, you can construct that object with a simple constructor that takes a number of parameters such as, name, age, address, place of birth, etc.

However, if you have a complex object, say a 747 or a nuclear submarine, then the code to construct that object may swamp the implementation code for the object. To avoid this the construction code is abstracted away from the implementation.

The UML diagram for this pattern looks a little like this.

The C# implementation would be something like this...

using System;
using System.Collections.Generic;
using System.Text;

namespace garyshort.Patterns.Builder
{
    //Define the classes and interfaces
    public class Director
    {
        public ProductBase 
            Constructor(iBuilder builder)
        {
            builder.Build();
            return builder.GetResult();
        }
	
    }

    public interface iBuilder
    {
        ProductBase GetResult();
        void Build();
    }

    public abstract class ProductBase
    {
        private string _Owner;

        public string Owner
        {
            get { return _Owner; }
            set { _Owner = value; }
        }
	
    }

    public class Car : ProductBase
    {
        private bool _Wheels;
        private bool _Chasis;
        private bool _Body;
        private bool _Interior;

        public bool Interior
        {
            set { _Interior = value; }
        }
	

        public bool Body
        {
            set { _Body = value; }
        }
	
        public bool Chasis
        {
            set { _Chasis = value; }
        }
	
        public bool Wheels
        {
            set { _Wheels = value; }
        }
	
        public void Drive()
        {
            Console.WriteLine
                ("Car is driving!");
        }
    }

    public class Plane : ProductBase
    {
        private bool _Cockpit;

        public bool Cockpit
        {
            set { _Cockpit = value; }
        }

        private bool _Fussilage;

        public bool Fussilage
        {
            set { _Fussilage = value; }
        }

        private bool _Tail;

        public bool Tail
        {
            set { _Tail = value; }
        }

        private bool _Wings;

        public bool Wings
        {
            set { _Wings = value; }
        }

        private bool _Undercarriage;

        public bool Undercarriage
        {
            set { _Undercarriage = value; }
        }

        public void Fly()
        {
            Console.WriteLine("Plane is flying!");
        }
    }

    public class CarBuilder : iBuilder
    {
        private Car _Car = new Car();

        public void Build()
        {
            Console.WriteLine
                ("Beginning car construction.");
            Console.WriteLine
                ("Setting owner.");
            _Car.Owner = "Gary Short";
            Console.WriteLine
                ("Building chasis");
            _Car.Chasis = true;
            Console.WriteLine(
                "Building body");
            _Car.Body = true;
            Console.WriteLine(
                "Building wheels");
            _Car.Wheels = true;
            Console.WriteLine
                ("Building interior");
            _Car.Interior = true;
            Console.WriteLine
                ("Car construction complete.");
        }

        public ProductBase GetResult()
        {
            return _Car;
        }
    }

    public class PlaneBuilder : iBuilder
    {
        private Plane _Plane = new Plane();

        public void Build()
        {
            Console.WriteLine
                ("Beginning plane construction.");
            Console.WriteLine
                ("Setting owner.");
            _Plane.Owner = "Richard Branson.";
            Console.WriteLine
                ("Building cockpit.");
            _Plane.Cockpit = true;
            Console.WriteLine
                ("Building fussilage.");
            _Plane.Fussilage = true;
            Console.WriteLine
                ("Building tail.");
            _Plane.Tail = true;
            Console.WriteLine
                ("Building wings.");
            _Plane.Wings = true;
            Console.WriteLine
                ("Building undercarriage.");
            _Plane.Undercarriage = true;
            Console.WriteLine
                ("Plane construction complete.");
        }
        public ProductBase GetResult()
        {
            return _Plane;
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            //Test the pattern

            //I want a car and a plane, 
            //so ask the director to 
            //build them for me.
            Director d = new Director();
            Car MyCar = d.Constructor(
                new CarBuilder()) as Car;
            Plane myPlane = d.Constructor(
                new PlaneBuilder()) as Plane;

            //Now make the car and plane do stuff
            MyCar.Drive();
            myPlane.Fly();
        }
    }
}

The output from this pattern looks like this.