He appeared as Sir Leigh Teabing in The Da Vinci Code .
Best known for his roles as Gandalf in the 2001-2003 Lord of the Rings movie trilogy , as Sir Leigh Teabing in The Da Vinci Code , and as Magneto in the X-Men series of movies .